Fix delegate_to to use group rather then undercloud

Using delegate_to: undercloud relies on the director host name
being "undercloud". We should instead delegate to the first
host in the "Undercloud" group.

Change-Id: I3560d27deb316100c3c4bf70c609c7367192d44a
This commit is contained in:
Lewis Denny 2021-09-22 20:52:40 +10:00
parent 8d3fa2291f
commit d346aa94bd
3 changed files with 4 additions and 4 deletions

View File

@ -785,7 +785,7 @@ outputs:
import_role:
name: lunasa_hsm
tasks_from: unregister_client
delegate_to: undercloud
delegate_to: "{{ groups['Undercloud'] | first }}"
vars:
- map_merge:
- {get_param: LunasaVars}

View File

@ -204,7 +204,7 @@ outputs:
- name: unregister node from ipa server
import_role:
name: tripleo_ipa_cleanup
delegate_to: undercloud
delegate_to: "{{ groups['Undercloud'] | first }}"
vars:
tripleo_ipa_keytab: {get_param: IdMNovaKeytab}
tripleo_ipa_hosts_to_delete:

View File

@ -392,12 +392,12 @@ outputs:
run_once: true
changed_when: false
failed_when: false
delegate_to: undercloud
delegate_to: "{{ groups['Undercloud'] | first }}"
- name: Deleting nova-consoleauth
command: "openstack compute service delete {{ item.ID }}"
loop: "{{ nova_compute_service_result.stdout | from_yaml | default([]) }}"
run_once: true
delegate_to: undercloud
delegate_to: "{{ groups['Undercloud'] | first }}"
failed_when: false
external_upgrade_tasks:
- when: