cd "`dirname \"$0\"`" &&
ANSIBLE_ROLES_PATH=debian/roles:roles \
- exec ../run-role add-apache-vhost "$@" \
+ exec ../run-roles add-apache-vhost "$@" \
-e virtual_host="$vhost" -e gather_facts=true
cd "`dirname \"$0\"`" &&
ANSIBLE_ROLES_PATH=debian/roles:roles \
- exec ../run-role add-dns-domain "$@" \
+ exec ../run-roles add-dns-domain "$@" \
-e domain="$domain" -e gather_facts=true
+++ /dev/null
-#! /bin/sh
-
-if [ -z "$1" ]; then
- echo "Usage: $0 role [...params...]" >&2
- exit 1
-fi
-
-role="$1"
-shift
-
-cd "`dirname \"$0\"`" &&
-exec ansible-playbook run-role.yml "$@" -e role="$role"
+++ /dev/null
-- name: "Run role {{ role }}"
- hosts: "{{ hosts | default('all') }}"
- gather_facts: "{{ gather_facts | default('false') }}"
- roles:
- - "{{ role }}"
--- /dev/null
+#! /bin/sh
+
+if [ -z "$1" ]; then
+ echo "Usage: $0 role1[,role2,...] [...params...]" >&2
+ exit 1
+fi
+
+roles="$1"
+shift
+
+cd "`dirname \"$0\"`" &&
+exec ansible-playbook run-roles.yml "$@" -e roles="$roles"
--- /dev/null
+- name: "Run roles {{ roles }}"
+ hosts: "{{ hosts | default('all') }}"
+ gather_facts: "{{ gather_facts | default('false') }}"
+ tasks:
+ - include_role:
+ name: "{{ role }}"
+ loop: "{{ roles.split(',') }}"
+ loop_control:
+ loop_var: role # to avoid collision with {{ item }}