ARTH TASK 14.3
Task Description??
?? 14.3 Create an ansible Playbook which will dynamically load the variable file named the same as OS_name and just by using the variable names we can Configure our target node. ( Note: No need to use when keyword here. )
Step 1: Launching 3 Instances In AWS
Step 2: Create inventory file
cmd: vim ip.txt
Step 3: Install ansible software in controller node.
cmd: sudo amazon-linux-extras install ansible2
Step 4: Write an ansible configuration file in controller node.
cmd: vim ansible.cfg
Step 5: To check the list of hosts:
cmd: ansible all --list-hosts
Step 6: To ping hosts:
cmd: ansible all -m ping
Step 7: Create the variable file in the controller node.
Step 8: For RedHat OS
cmd: vim RedHat.yml
Step 9: For Ubuntu OS
cmd: vim Ubuntu.yml
Step 10: Create a playbook to configure webserver
cmd: vim task14.3.yml
Step 11: Create a Html file
cmd: vim web.html
Step 12: Run the Ansible playbook.
cmd: ansible-playbook task14.3.yml
Step 13: Now check the output.
Thank You.