From: Christian Pointner Date: Sat, 21 Apr 2018 17:08:30 +0000 (+0200) Subject: ansible: fix reserved variable warning X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=2a0e665ab059cbdb7110632e473bcde5387ed7d5;p=noc.git ansible: fix reserved variable warning --- 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 }}"