Created
October 3, 2016 14:12
-
-
Save nzwulfin/e368c669c294d1ad5543a31623a179db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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