Skip to content

Commit 2c65a27

Browse files
committed
Fail playbook when Ironic node reaches failed state
Stop silently accepting 'deploy failed' as a successful deployment outcome. Add failed_when so the task fails immediately when the node reaches that state, while still exiting the retry loop early.
1 parent 997e4ce commit 2c65a27

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

playbooks/tasks/configure_hardware_ironic_node.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
status_code: [200]
190190
register: node_state
191191
until: node_state.json.provision_state in ["active", "deploy failed"]
192+
failed_when: node_state.json.provision_state == "deploy failed"
192193
retries: 60
193194
delay: 10
194195
when: current_provision_state == "available"

0 commit comments

Comments
 (0)