Table of contents
- <mark>Task-01</mark>
- create 3 EC2 instances . make sure all three are created with same key pair
- Install Ansible in host server
- copy the private key from local to Host server (Ansible_host) at (/home/ubuntu/.ssh)
- access the inventory file using sudo vim /etc/ansible/hosts
- Create a playbook to install Nginx
- deploy a sample webpage using the ansible playbook2. Connect master server with SSH and install ansible on it
- <mark>Here we go!</mark>
Note: Installation part done in previous blog.
Task-01
create 3 EC2 instances . make sure all three are created with same key pair
Install Ansible in host server
copy the private key from local to Host server (Ansible_host) at (/home/ubuntu/.ssh)
access the inventory file using sudo vim /etc/ansible/hosts
Create a playbook to install Nginx
deploy a sample webpage using the ansible playbook2. Connect master server with SSH and install ansible on it
Create EC2 instances and connected thru pem file.
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
Write Playbook to install NGINX.
index.html
run the playbook
Here we go!
Happy Learning :)
Thank you for reading!! Hope you find this helpful.
#day59#90daysofdevops#devopscommunity#
Github for reference:https://github.com/gsbarure/Ansible-playbooks.git
ย