From a4898108bd47735fd5db5a534c43dcb75a9e1235 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 14 May 2018 22:07:31 -0700 Subject: [PATCH] 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 --- tasks/update/create-update-scripts.yaml | 3 ++- tasks/upgrade/create-upgrade-scripts.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/update/create-update-scripts.yaml b/tasks/update/create-update-scripts.yaml index 82a83963..42b96805 100644 --- a/tasks/update/create-update-scripts.yaml +++ b/tasks/update/create-update-scripts.yaml @@ -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 diff --git a/tasks/upgrade/create-upgrade-scripts.yaml b/tasks/upgrade/create-upgrade-scripts.yaml index 939f511e..03ec558d 100644 --- a/tasks/upgrade/create-upgrade-scripts.yaml +++ b/tasks/upgrade/create-upgrade-scripts.yaml @@ -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