Use become when testing image presence

Become is used on the play that builds the image, so it's possible we might not
be able to access it without root privileges.

Change-Id: I62d45e937b69215890fc88f1cd59c97319558994
This commit is contained in:
Mark Goddard 2019-01-28 10:44:30 +00:00
parent 53fa0c9eaa
commit a0b4577b7d
1 changed files with 1 additions and 0 deletions

View File

@ -84,6 +84,7 @@
get_checksum: yes
checksum_algorithm: md5
register: test_deploy_image
become: yes
when: instance_info is not defined or ( instance_info is defined and instance_info | to_json == '{}' )
- 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."