diff options
author | binary <me@rgoncalves.se> | 2020-08-11 12:09:38 +0200 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-08-11 12:09:38 +0200 |
commit | da3101946e72a5ecfe8daf81c7213904b372776b (patch) | |
tree | 4df3dc010593f1b9c03851f5353d69332652a7a0 | |
parent | e14b4f0a4b4a89b2a5cd4a2989496b8c4e7740e8 (diff) | |
download | infrastructure-da3101946e72a5ecfe8daf81c7213904b372776b.tar.gz |
rev1 for generating per-tags playbook
-rwxr-xr-x | generate_all | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/generate_all b/generate_all new file mode 100755 index 0000000..3a77394 --- /dev/null +++ b/generate_all @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Generate specific ansible playbook with all roles inside, +# ready to be called with "--tags" argument + +ROLES_DIR="./roles" +ROLES=$(ls ${ROLES_DIR}) +PLAYBOOK_OUT="play-all.yml" + +echo "" > ${PLAYBOOK_OUT} + +for role in ${ROLES[@]}; do +cat << EOF >> ${PLAYBOOK_OUT} +- name: Standalone role [-] ${role} + hosts: all + tags: + - ${role} + roles: + - ${role} + +EOF +done |