The activity showcases the use of ansible roles to optimize an Ansible playbook.
Objectives
- Create an Ansible Playbook that uses Ansible roles as optimization.
Tasks
- Fork this repository https://github.com/ajcanlas-tip/sysad2-12021.git
- Clone your newly forked repository.
- Make a new branch named “activity5” from master branch using git branch activity5 and git checkout activity5
- Note: To Prevent Conflicts Create a directory with your username as its name and go inside of it, and create a directory called “activity5” and go inside it.
- Make a new new remote upstream with git remote add upstream https://github.com/ajcanlas-tip/sysad2-12021.git
- Optimize the playbook in Hands-on Activity 4: Ansible Playbooks
- add,commit and push it to your activity5 branch
- Request a pull request for the master branch in https://github.com/ajcanlas-tip/sysad2-12021.git and activity5 branch of your forked repository.
Output
jpcabral-tip/activity5/ansible.cfg
jpcabral-tip/activity5/inventory
jpcabral-tip/activity5/playbook.yaml
jpcabral-tip/activity5/roles/installpackages-centos/tasks/main.yml
jpcabral-tip/activity5/roles/installpackages-ubuntu/tasks/main.yml
jpcabral-tip/activity5/roles/pipinstall/tasks/main.yml
Execute using the following command to run the playbook:
As seen on Github.