Formatting fixes for the module.run changes

This fixes the RST formatting so that it renders properly in the
bulleted list format. It also makes some changes to the wording for
clarification purposes.
This commit is contained in:
Erik Johnson 2017-04-07 10:00:48 -05:00
parent 3bbebd7d82
commit c36c9465e6

View File

@ -61,48 +61,50 @@ State Module Changes
start/stop the service using the ``--no-block`` flag in the ``systemctl``
command. On non-systemd minions, a warning will be issued.
- The :py:func:`module.run <salt.states.module.run>` state has dropped its previous
syntax with ``m_`` prefix for reserved keywords. Additionally, it allows
running several functions in a batch.
- The :py:func:`module.run <salt.states.module.run>` state has dropped its
previous syntax with ``m_`` prefix for reserved keywords. Additionally, it
allows running several functions in a batch.
.. note::
It is nesessary to explicitly turn on the new behaviour (see below)
.. note::
It is necessary to explicitly turn on the new behavior (see below)
Before and after:
.. code-block:: yaml
.. code-block:: yaml
# Before
run_something:
module.run:
- name: mymodule.something
- m_name: 'some name'
- kwargs: {
first_arg: 'one',
second_arg: 'two',
do_stuff: 'True'
}
# Before
run_something:
module.run:
- name: mymodule.something
- m_name: 'some name'
- kwargs: {
first_arg: 'one',
second_arg: 'two',
do_stuff: 'True'
}
# After
run_something:
module.run:
mymodule.something:
- name: some name
- first_arg: one
- second_arg: two
- do_stuff: True
- Previous behaviour of the function :py:func:`module.run <salt.states.module.run>` is
still kept by default and can be bypassed in case you want to use behaviour above.
Please keep in mind that the old syntax will no longer be supported in the ``Oxygen``
release of Salt. To enable the new behavior, add the following to the minion config file:
# After
run_something:
module.run:
mymodule.something:
- name: some name
- first_arg: one
- second_arg: two
- do_stuff: True
.. code-block:: yaml
Since a lot of users are already using :py:func:`module.run
<salt.states.module.run>` states, this new behavior must currently be
explicitly turned on, to allow users to take their time updating their SLS
files. However, please keep in mind that the new syntax will take effect in
the next feature release of Salt (Oxygen) and the old usage will no longer be
supported at that time.
use_superseded:
- module.run
To enable the new behavior for :py:func:`module.run <salt.states.module.run>`,
add the following to the minion config file:
.. code-block:: yaml
use_superseded:
- module.run
Execution Module Changes