Skip to content

Commit

Permalink
Merge pull request #288 from stfc/add_patch_workflow_rule
Browse files Browse the repository at this point in the history
ENH: Added rule to start the patch reboot workflow
  • Loading branch information
lizsalmon authored Nov 28, 2024
2 parents 6b9f51f + efd769a commit f947ef1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions rules/hv.patch.reboot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "hv.patch.reboot"
pack: "stackstorm_openstack"
description: "Starts the patch reboot action when the hypervisor is drained"
enabled: true

criteria:
trigger.previous_state:
type: equals
pattern: DRAINING
trigger.current_state:
type: equals
pattern: DRAINED

trigger:
type: "stackstorm_openstack.hypervisor.state_change"

action:
ref: "stackstorm_openstack.hv.patch.reboot"
parameters:
icinga_account_name: "default"
hypervisor_name: "{{ trigger.hypervisor_name }}"
private_key_path: "/home/stanley/.ssh/id_rsa"

0 comments on commit f947ef1

Please sign in to comment.