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
This commit is contained in:
parent
9521f6a9b2
commit
bc192cac9d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user