Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nzwulfin
Created October 3, 2016 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nzwulfin/e368c669c294d1ad5543a31623a179db to your computer and use it in GitHub Desktop.
Save nzwulfin/e368c669c294d1ad5543a31623a179db to your computer and use it in GitHub Desktop.
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