Created
April 23, 2014 01:59
-
-
Save skamithi/11200462 to your computer and use it in GitHub Desktop.
script to create ansible playbook structure
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
#!/bin/bash | |
# Script to create ansible playbook directories | |
# define your roles here | |
roles=(upgrade packages) | |
directories=(tasks handlers files default vars templates) | |
# create playbook | |
mkdir global_vars | |
for i in ${roles[@]}; do | |
for j in ${directories[@]}; do | |
mkdir -p ${i}/${j} | |
done | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mkdir -p group_vars host_vars plugins library roles/role{1..3}/{tasks,templates,handlers,files,vars,defaults,meta}
Move the -p to the left ;)