diff --git a/rules/hv.patch.reboot.yaml b/rules/hv.patch.reboot.yaml new file mode 100644 index 00000000..e457ae82 --- /dev/null +++ b/rules/hv.patch.reboot.yaml @@ -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"