Working With Ansible Playbooks For Tasks & Adhoc Commands
- Setting-up Ansible host
- Login to your Ansible host
- Browse to /home/ec2-user/ansible directory
- Create a new folder, namely playbook
mkdir playbooks cd playbooks
- ping.yaml
- Create a new file:
vim ping.yml
- Content of file, Click Here!
- Now run you playbook with:
ansible-playbook ping.yml
- Create a new file:
- uname.yml
- Create a new file:
vim uname.yml
- Content of file, Click Here!
- Now run you playbook with:
ansible-playbook uname.yml
- Create a new file:
- yum-update.yml
- Create a new file:
vim yum-update.yml
- Content of file, Click Here!
- Now run you playbook with:
ansible-playbook yum-update.yml
- Create a new file: