mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
"Fire Event Notifications" moved down
it is less important. "Requisites" is what the page is about.
This commit is contained in:
parent
9e11f3aac5
commit
4a3a6629ce
@ -4,40 +4,6 @@
|
||||
Requisites and Other Global State Arguments
|
||||
===========================================
|
||||
|
||||
.. _requisites-fire-event:
|
||||
|
||||
Fire Event Notifications
|
||||
========================
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
The `fire_event` option in a state will cause the minion to send an event to
|
||||
the Salt Master upon completion of that individual state.
|
||||
|
||||
The following example will cause the minion to send an event to the Salt Master
|
||||
with a tag of `salt/state_result/20150505121517276431/dasalt/nano` and the
|
||||
result of the state will be the data field of the event. Notice that the `name`
|
||||
of the state gets added to the tag.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
nano_stuff:
|
||||
pkg.installed:
|
||||
- name: nano
|
||||
- fire_event: True
|
||||
|
||||
In the following example instead of setting `fire_event` to `True`,
|
||||
`fire_event` is set to an arbitrary string, which will cause the event to be
|
||||
sent with this tag:
|
||||
`salt/state_result/20150505121725642845/dasalt/custom/tag/nano/finished`
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
nano_stuff:
|
||||
pkg.installed:
|
||||
- name: nano
|
||||
- fire_event: custom/tag/nano/finished
|
||||
|
||||
Requisites
|
||||
==========
|
||||
|
||||
@ -449,6 +415,40 @@ Now the httpd server will only start if php or mod_python are first verified to
|
||||
be installed. Thus allowing for a requisite to be defined "after the fact".
|
||||
|
||||
|
||||
.. _requisites-fire-event:
|
||||
|
||||
Fire Event Notifications
|
||||
========================
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
The `fire_event` option in a state will cause the minion to send an event to
|
||||
the Salt Master upon completion of that individual state.
|
||||
|
||||
The following example will cause the minion to send an event to the Salt Master
|
||||
with a tag of `salt/state_result/20150505121517276431/dasalt/nano` and the
|
||||
result of the state will be the data field of the event. Notice that the `name`
|
||||
of the state gets added to the tag.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
nano_stuff:
|
||||
pkg.installed:
|
||||
- name: nano
|
||||
- fire_event: True
|
||||
|
||||
In the following example instead of setting `fire_event` to `True`,
|
||||
`fire_event` is set to an arbitrary string, which will cause the event to be
|
||||
sent with this tag:
|
||||
`salt/state_result/20150505121725642845/dasalt/custom/tag/nano/finished`
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
nano_stuff:
|
||||
pkg.installed:
|
||||
- name: nano
|
||||
- fire_event: custom/tag/nano/finished
|
||||
|
||||
Altering States
|
||||
===============
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user