From 2a0e665ab059cbdb7110632e473bcde5387ed7d5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 21 Apr 2018 19:08:30 +0200 Subject: [PATCH] ansible: fix reserved variable warning --- ansible/apply-role.sh | 2 +- ansible/generic.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/apply-role.sh b/ansible/apply-role.sh index 75db316..3d39f34 100755 --- a/ansible/apply-role.sh +++ b/ansible/apply-role.sh @@ -10,4 +10,4 @@ role="$1" shift echo "######## applying the role '$role' to host(s) '$hosts' ########" -exec ansible-playbook -e "hosts=$hosts" -e "role=$role" $@ generic.yaml +exec ansible-playbook -e "myhosts=$hosts" -e "myrole=$role" $@ generic.yaml diff --git a/ansible/generic.yaml b/ansible/generic.yaml index fe74120..d3b8de8 100644 --- a/ansible/generic.yaml +++ b/ansible/generic.yaml @@ -1,5 +1,5 @@ --- -- name: "Apply role {{ role }} to hosts: {{ hosts }}" - hosts: "{{ hosts }}" +- name: "Apply role {{ myrole }} to hosts: {{ myhosts }}" + hosts: "{{ myhosts }}" roles: - - role: "{{ role }}" + - role: "{{ myrole }}" -- 1.7.10.4