Skip to content

Instantly share code, notes, and snippets.

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
- ansible
- defaults/
- files/
- handlers/
- meta/
- playbooks/
- groups/
- hosts/
- roles/
- base/
- tasks/
- templates/
- vars/
Create any specific roles for the project
$ for role in broker activemq mongodb node ; do
ansible-galaxy init -p ansible/roles/ $role
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