Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ansible scaffolding for project, created in root of project directory
$ ansible-galaxy init ansible
$ mkdir -p ansible/playbooks/groups ansible/playbooks/hosts ansible/roles
Create the base role for the project for all common tasks
$ ansible-galaxy init -p ansible/roles/base
Project should now have TLD of ansible that holds the playbooks and roles
<project>
|
- ansible
|
- defaults/
- files/
- handlers/
- meta/
- playbooks/
|
- groups/
- hosts/
- roles/
|
- base/
- tasks/
- templates/
- vars/
- README.md
Create any specific roles for the project
$ for role in broker activemq mongodb node ; do
ansible-galaxy init -p ansible/roles/ $role
done
This will create the scaffolding directories for each of the desired roles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment