From fcacca0b80734c0b8da9401118b7d263dbe01975 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Sat, 26 Sep 2015 08:23:12 -0400 Subject: [PATCH] Make use of host fact collection for name based inventories This change invokes the call to the the fact collection method as well as corrects a bug that that call exposed if instance_info is supplied in advance. Change-Id: I45c88e4860c06fb6f34511ccd679077ffd0ed89e Closes-Bug: 1499057 --- playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml | 4 ++++ playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml index 99cff844d..6dbc98155 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +# Note(TheJulia): Fact collection from ironic is necessary to obtain +# the host's assigned UUID value. +- name: "Update facts from ironic to fill in any missing values" + include: update_facts_from_ironic.yaml - name: "Identify ssh_public_key if ssh_public_key_path is defined" include: ssh_public_key_path.yaml when: ssh_public_key is undefined and ssh_public_key_path is defined diff --git a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml index 2db5d5413..849b20033 100644 --- a/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml @@ -34,7 +34,7 @@ when: instance_info is not defined - name: "Error if deploy_image is not present, and instance_info is not defined" fail: msg="The user-defined deploy_image, which is the image to be written to the remote node(s) upon deployment, was not found. Cannot proceed." - when: test_deploy_image.stat.exists | bool == false and instance_info is not defined + when: instance_info is not defined and test_deploy_image.stat.exists | bool == false - name: "Deploy to hardware - bifrost default" os_ironic_node: auth_type: None