Allow exit code of 0 only for deployments
All the hook scripts record 0 for success and non-zero for failure. hook-puppet.py already handles a successful return code of 0 or 2 for puppet and always writes a 0 as the return code to indicate success to the json status file[1]. [1] https://github.com/openstack/heat-templates/blob/master/hot/software-config/elements/heat-config-puppet/install.d/hook-puppet.py#L161 Change-Id: I7c6c5e6395dbcf049072ecb1228fc10f83f1db7f
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
path: /var/lib/heat-config/deployed/{{ deployment_uuid }}.json
|
||||
state: absent
|
||||
become: true
|
||||
when: deployed_file_stat.stat.exists and previous_deployment_result.rc not in (0, 2)
|
||||
when: deployed_file_stat.stat.exists and previous_deployment_result.rc != 0
|
||||
|
||||
- name: "Force remove deployed file for {{ item }}"
|
||||
file:
|
||||
@@ -51,7 +51,7 @@
|
||||
- status_code: "{{ deployment_result.rc }}"
|
||||
tags:
|
||||
- output
|
||||
failed_when: deployment_result.rc not in (0, 2)
|
||||
failed_when: deployment_result.rc != 0
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: "Check-mode for Run deployment {{ item }}"
|
||||
|
Reference in New Issue
Block a user