We define the state of all target servers with Ansible. This folder contains Ansible Roles that are used by the different playbooks in folders ansible/playbooks
and ansible/playbooks
:
- If you have reached this file it's assumed you have read the main README file, if you haven't please read it first and then comeback here
- To create a new role simply create a folder with the role name inside
ansible
folder - Create a folder named
tasks
inside the role folder - Create a file named
main.yml
inside thetasks
folder - Note that roles can have more folders and files but the above is the bare minimum that is needed as any other folders and files are optional
- If you are not familiar with Yaml it's recommended to do a tutorial about Yaml language and also then look into Ansible Roles documentation for more details
- Once your role is ready to be added to an existing playbook or create a new playbook that will use this role as required
- If a new playbook is created or if modifying an existing playbook then push the changes first to
ansible/playbooks
folder and test it in the Ansible Sandpit. For more information about how to run ansible playbooks seeREADME
file in ansible/playbooks/README.md folder - Once the playbook has been tested from
ansible/playbooks
folder and test results are satisfactory then push your changes toansible/playbooks
folder. For more information about how to run ansible playbooks seeREADME
file in ansible/playbooks/README.md folder