View Code? Open in Web Editor
NEW
Ansible install and scripts for a class on ansible
ansible's Introduction
Ansible Automation Scripts for CentOS 8
![Important](https://camo.githubusercontent.com/1739b6418637837d15cddd7ba182ed363e760dce9bb1bbcfcc00839559369a34/68747470733a2f2f63646e2e706978616261792e636f6d2f70686f746f2f323031362f30392f32392f31332f35312f696d706f7274616e742d313730323837385f3634302e706e67)
- By default Ansible checks
/etc/ansible/hosts
for the default hosts file.
- I recommend changing the host(s) IP addresses to reflect your network layout.
- I recommend then putting hosts in /etc/ansible/
- By default Ansible checks /etc/ansible/vars for default vars
- I did not use any default vars - this file is not required for this scenario, but you could create a file and define puppet vars there
- The shell script installs ansible without any of the default files - if people install it differently, they may see different results
- All of the above is subject to change without notice - welcome to continuous delivery.
- Finally - google is your friend. If you don't understand something, search first, try something second, ask third.
Recommended Sequence of Actions:
- copy ansibleInstall.sh onto target Cent OS 8 VM
- vim ansibleInstall.sh and see what it is you are about to run
- chmod +x ansibleInstall.sh
- After you understand it, run ./ansibleInstall.sh
- copy playbook.yaml onto target control Cent OS 8 VM in your home directory
- copy hosts onto target control Cent OS 8 VM into /etc/ansible directory
- vim playbook.yaml and see what it is doing
- After you understand playbook.yaml, run ansible-playbook playbook.yaml
- troubleshoot all errors
Note: I added my gitPlaybook.yaml just as another use case.
This is an example of automating even code updates.
![cthulu](https://camo.githubusercontent.com/764adf26dec53319be5cbe051917a89d00c4d19d53c59282b064efb4e52cbf22/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3239333136362f696d616765732f676f74686963253230647265616d73253230637468756c687525323074686525323063686173652e6a7067)
ansible's People
Contributors
Watchers