aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgenerate_all22
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
remember that computers suck.