From c44f4815cf22955a2b68937b03b50c81f81fade6 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 10 May 2021 10:53:48 +0100 Subject: [PATCH] Fixes for Ansible 2.10 os_image_facts renamed to os_image_info, and no longer sets a fact. Instead we use the registered result. The same is true for os_networks_facts and os_networks_info. We did not catch the networks issue in CI because the code only runs with a VLAN provisioning network, and we use a flat network. Change-Id: I6a801e8bb5171bebd2b3f20d6140329d38ea36a5 --- ansible/provision-net.yml | 8 ++++---- ansible/roles/ipa-images/tasks/set-driver-info.yml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/provision-net.yml b/ansible/provision-net.yml index 50f1135ea..108cbb2fc 100644 --- a/ansible/provision-net.yml +++ b/ansible/provision-net.yml @@ -89,7 +89,7 @@ - block: - name: Gather facts about provisioning network - os_networks_facts: + os_networks_info: auth: "{{ openstack_auth }}" auth_type: "{{ openstack_auth_type }}" cacert: "{{ openstack_cacert | default(omit, true) }}" @@ -100,7 +100,7 @@ - name: Set provisioning network to unshared command: "{{ venv }}/bin/openstack network set {{ provision_net.name }} --no-share" changed_when: true - when: openstack_networks[0].shared + when: provisioning_network_facts.openstack_networks[0].shared environment: "{{ openstack_auth_env }}" vars: ansible_python_interpreter: "{{ venv }}/bin/python" @@ -108,7 +108,7 @@ - block: - name: Gather facts about cleaning network - os_networks_facts: + os_networks_info: auth: "{{ openstack_auth }}" auth_type: "{{ openstack_auth_type }}" cacert: "{{ openstack_cacert | default(omit, true) }}" @@ -119,7 +119,7 @@ - name: Set cleaning network to unshared command: "{{ venv }}/bin/openstack network set {{ cleaning_net.name }} --no-share" changed_when: true - when: openstack_networks[0].shared + when: cleaning_network_facts.openstack_networks[0].shared environment: "{{ openstack_auth_env }}" vars: ansible_python_interpreter: "{{ venv }}/bin/python" diff --git a/ansible/roles/ipa-images/tasks/set-driver-info.yml b/ansible/roles/ipa-images/tasks/set-driver-info.yml index ead8a96a9..5e70eef50 100644 --- a/ansible/roles/ipa-images/tasks/set-driver-info.yml +++ b/ansible/roles/ipa-images/tasks/set-driver-info.yml @@ -1,7 +1,7 @@ --- - name: Retrieve deployment image uuids - os_image_facts: + os_image_info: auth_type: "{{ ipa_images_openstack_auth_type }}" auth: "{{ ipa_images_openstack_auth }}" cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}" @@ -14,11 +14,11 @@ - name: Set fact containing kernel uuid set_fact: - ipa_images_kernel_uuid: "{{ ipa_images_glance.results[0].ansible_facts.openstack_image.id }}" + ipa_images_kernel_uuid: "{{ ipa_images_glance.results[0].openstack_image.id }}" - name: Set fact containing ramdisk uuid set_fact: - ipa_images_ramdisk_uuid: "{{ ipa_images_glance.results[1].ansible_facts.openstack_image.id }}" + ipa_images_ramdisk_uuid: "{{ ipa_images_glance.results[1].openstack_image.id }}" - name: Get a list of ironic nodes command: |