Merge "Fix fact definition for deployments" into stable/train

This commit is contained in:
Zuul 2021-03-03 05:35:54 +00:00 committed by Gerrit Code Review
commit 9b7358351c
1 changed files with 4 additions and 4 deletions

View File

@ -6,11 +6,11 @@
- name: Lookup deployment UUID - name: Lookup deployment UUID
set_fact: set_fact:
deployment_uuid: "{{ lookup('file', tripleo_role_name ~ '/' ~ ansible_hostname | lower ~ '/' ~ item) | from_yaml | json_query(item_id) }}" deployment_uuid: "{{ lookup('file', tripleo_role_name ~ '/' ~ ansible_facts['hostname'] | lower ~ '/' ~ item) | from_yaml | json_query(item_id) }}"
- name: Lookup deployment group - name: Lookup deployment group
set_fact: set_fact:
deployment_group: "{{ lookup('file', tripleo_role_name ~ '/' ~ ansible_hostname | lower ~ '/' ~ item) | from_yaml | json_query(item_group) }}" deployment_group: "{{ lookup('file', tripleo_role_name ~ '/' ~ ansible_facts['hostname'] | lower ~ '/' ~ item) | from_yaml | json_query(item_group) }}"
- name: Hiera check and diff mode - name: Hiera check and diff mode
block: block:
@ -35,7 +35,7 @@
- name: "Template deployment file for {{ item }}" - name: "Template deployment file for {{ item }}"
template: template:
src: "{{ tripleo_role_name ~ '/' ~ ansible_hostname | lower ~ '/' ~ item }}" src: "{{ tripleo_role_name ~ '/' ~ ansible_facts['hostname'] | lower ~ '/' ~ item }}"
dest: "/var/lib/heat-config/check-mode/tripleo-config-download/{{ item ~ '-' ~ deployment_uuid }}.rendered" dest: "/var/lib/heat-config/check-mode/tripleo-config-download/{{ item ~ '-' ~ deployment_uuid }}.rendered"
# variable_start/end are overridden since the Heat template must be # variable_start/end are overridden since the Heat template must be
# valid yaml, so the jinja expression must be wrapped in quotes in the # valid yaml, so the jinja expression must be wrapped in quotes in the
@ -122,7 +122,7 @@
- name: "Template deployment file for {{ item }}" - name: "Template deployment file for {{ item }}"
template: template:
src: "{{ tripleo_role_name ~ '/' ~ ansible_hostname | lower ~ '/' ~ item }}" src: "{{ tripleo_role_name ~ '/' ~ ansible_facts['hostname'] | lower ~ '/' ~ item }}"
dest: "/var/lib/heat-config/tripleo-config-download/{{ item ~ '-' ~ deployment_uuid }}.rendered" dest: "/var/lib/heat-config/tripleo-config-download/{{ item ~ '-' ~ deployment_uuid }}.rendered"
# variable_start/end are overridden since the Heat template must be # variable_start/end are overridden since the Heat template must be
# valid yaml, so the jinja expression must be wrapped in quotes in the # valid yaml, so the jinja expression must be wrapped in quotes in the