Ansible Contd..
- In Ansible the unit of work is module.
- Lets try to use Ansible to install apache server on Ubuntu
- Identify and execute the manual steps in configuring the apache server
sudo apt update sudo apt install apache2 -y- Lets Execute these steps to verify if they are working
- Ansible Steps:
- Try to identify and create/edit inventory
- Refer Here to understand playbook syntax
- Searching modules in Ansible
- Simple Approach: Google
<cmd> in Ansible
- Any module in Ansible will have a
stateparameter
- Simple Approach: Google
- Refer Here for the playbook written in the class
- Usage of Ansible Playbook

- To make this execution successful we need to provide inventory, playbook and private key
ansible-playbook -i hosts --private-key /home/ubuntu/ansible.pem apache.yaml
- Lets try to make our ansible lab setup more like an enterprise setup

- Things to explore before doing this
- visudo
- ssh-keygen
- ssh configuration in /etc/ssh/sshd_config
- enable/disable password based authentication in linux
