Use tripleo_role_name instead of role_name

role_name is private in Ansible 2.2 and we were lucky that it worked
until 2.4 but now in 2.5 it conflicts with tripleo vars.
We need to stop using it as we rename it here:
https://review.openstack.org/#/q/topic:bug/1771171

Change-Id: Id52a9c6b40c2af0e1fb40476a50669b2e07d3541
Related-Bug: #1771171
This commit is contained in:
Emilien Macchi 2018-05-14 22:07:31 -07:00
parent 5ca79c26ad
commit a4898108bd
2 changed files with 4 additions and 2 deletions

View File

@ -40,7 +40,8 @@
shell: |
source {{ undercloud_rc }} ;
tripleo-ansible-inventory --plan {{ overcloud_stack_name }} {% if overcloud_ssh_user != '' %} --ansible_ssh_user {{ overcloud_ssh_user }} {% endif %} --static-yaml-inventory /tmp/fake-oc-hosts.yaml ;
awk -F':' '/role_name/ {gsub("[[:space:][:punct:]]", "", $2); print $2}' /tmp/fake-oc-hosts.yaml
# Switch to $2 when https://review.openstack.org/#/c/568347/ is merged
awk -F':' '/tripleo_role_name/ {gsub("[[:space:][:punct:]]", "", $3); print $3}' /tmp/fake-oc-hosts.yaml
register: oc_roles
- name: store roles

View File

@ -28,7 +28,8 @@
shell: |
source {{ undercloud_rc }} ;
tripleo-ansible-inventory --plan {{ overcloud_stack_name }} --static-yaml-inventory /tmp/fake-oc-hosts.yaml ;
awk -F':' '/role_name/ {gsub("[[:space:][:punct:]]", "", $2); print $2}' /tmp/fake-oc-hosts.yaml
# Switch to $2 when https://review.openstack.org/#/c/568347/ is merged
awk -F':' '/tripleo_role_name/ {gsub("[[:space:][:punct:]]", "", $3); print $3}' /tmp/fake-oc-hosts.yaml
register: oc_roles
- name: store roles