Giter Site home page Giter Site logo

holarmitidey / ansible Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devops4solutions/lavarel_application_using_ansible

0.0 0.0 0.0 11 KB

This repository will setup the php ,composer and install the sample lavarel application using Ansible

HTML 100.00%

ansible's Introduction

Ansible Role to setup php,composer and laravel application

This code is tested on the AWS ubuntu machine.

Requirements

  • Anisble Server - EC2 Ubuntu Instance (Ansible should be installed)
  • PHP Server - EC2 Ubuntu Instance
  • All variables are declared under group_vars/all.yaml

Prerequistie

  • Update inventory file inventories/dev/hosts
  • Generate the public key for the user ubuntu ssh-keygen on Ansible Server
  • Copy the id_rsa.pub from cd ~./ssh and paste it on the PHP Server vi ~/.ssh/authorized_keys or you can use the priavte key and run this playbook which will automatically copy the public key on the target hosts

Using Private Key Directly

  • Copy the private key on the ansible server
chmod 600 nidhi.pem
scp -r -i /Users/nidhi/Documents/devops4solutions/AWS/nidhi.pem /Users/nidhi/Documents/devops4solutions/AWS/nidhi.pem [email protected]:~/.

How to Run with private key

cd Ansible-playbook
ansible-playbook main.yml -i inventories/dev/hosts --user ubuntu --key-file /home/ubuntu/nidhi.pem

Access the application

Make sure security group of AWS EC2 PHP Server is open for port 80.

curl http://publicip

ansible's People

Contributors

devops4solutions avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.