From bc192cac9dc875214834f4a274019f790611b961 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Mon, 15 Jun 2015 17:19:11 -0400 Subject: [PATCH] Fix when logic for boolean handling Turns out Ansible has a specific way for booleans to be handled correctly, so we no longer need to attempt a boolean compare and a string compare. Changes the use_cirros logic so a user can disable that logic path. Change-Id: I49dcdb66f8c65f3fa13f3270ee610ab9e44eeacc Closes-Bug: 1465408 --- playbooks/roles/ironic-install/tasks/main.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/playbooks/roles/ironic-install/tasks/main.yml b/playbooks/roles/ironic-install/tasks/main.yml index 0a8a99f8f..0e9017ab3 100644 --- a/playbooks/roles/ironic-install/tasks/main.yml +++ b/playbooks/roles/ironic-install/tasks/main.yml @@ -247,11 +247,7 @@ when: test_core_os_image_present.stat.exists == false - name: "Download cirros to use for deployment if requested" get_url: url=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img dest="{{deploy_image}}" - # TODO(TheJulia): We may want to revise any boolean operators to - # comparison statements like the one below when they are able to be - # set via the command line as there are oddities across ansible - # versions with auto-translation of true/false values. - when: use_cirros == true or "'true' in use_cirros" + when: "{{use_cirros|bool}}" - name: "Test if Ubuntu 14.04 server cloud amd64 is present" stat: path={{ deploy_image }} register: test_os_image_present