Fix to use fail module on error
This commit is contained in:
parent
de604a0dfd
commit
07797ce472
@ -19,26 +19,26 @@
|
||||
local_action: stat path={{ http_boot_folder }}/coreos_production_pxe.vmlinuz
|
||||
register: test_core_os_kernel_present
|
||||
- name: "Error if the CoreOS kernel is missing."
|
||||
local_action: error msg="CoreOS kernel not found. Consider re-running setup."
|
||||
local_action: fail msg="CoreOS kernel not found. Consider re-running setup."
|
||||
when: test_core_os_kernel_present.stat.exists == false
|
||||
- name: "Verify CoreOS ramdisk is present."
|
||||
local_action: stat path={{ http_boot_folder }}/coreos_production_pxe_image-oem.cpio.gz
|
||||
register: test_core_os_image_present
|
||||
- name: "Error if the CoreOS ramdisk is missing."
|
||||
local_action: error msg="CoreOS ramdisk was not. Consider re-running setup."
|
||||
local_action: fail msg="CoreOS ramdisk was not. Consider re-running setup."
|
||||
when: test_core_os_image_present.stat.exists == false
|
||||
- name: "Verify that deployment image is present."
|
||||
local_action: stat path={{deploy_image}}
|
||||
register: test_deploy_image
|
||||
# TODO: checksum for the above stat operation will be required for deployment.
|
||||
- name: "Error if deployment image is missing."
|
||||
local_action: error msg="Deployment image is missing. Consider re-running setup."
|
||||
local_action: fail msg="Deployment image is missing. Consider re-running setup."
|
||||
when: test_deploy_image.stat.exists == false
|
||||
- name: "Check to see if there is a file where the ssh_key_path is defined"
|
||||
local_action: stat path={{ ssh_public_key_path }}
|
||||
register: test_ssh_public_key_path
|
||||
- name: "Error if ssh_public_key_path is not valid"
|
||||
local_action: error msg="CoreOS ramdisk was not. Consider re-running setup."
|
||||
local_action: fail msg="CoreOS ramdisk was not. Consider re-running setup."
|
||||
when: test_ssh_public_key_path.stat.exists == false
|
||||
- name: "Read ssh public key in"
|
||||
local_action: set_fact ssh_public_key="{{ lookup('file', ssh_public_key_path ) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user