Merge pull request #54545 from garethgreenaway/2019_2_1_port_49906

[master] Porting #49906 to master
This commit is contained in:
Daniel Wozniak 2019-10-16 12:30:20 -07:00 committed by GitHub
commit 5850ac227e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,10 +5,10 @@ Ordering States
===============
The way in which configuration management systems are executed is a hotly
debated topic in the configuration management world. Two
major philosophies exist on the subject, to either execute in an imperative
fashion where things are executed in the order in which they are defined, or
in a declarative fashion where dependencies need to be mapped between objects.
debated topic in the configuration management world. Two major philosophies
exist on the subject, to either execute in an imperative fashion where things
are executed in the order in which they are defined, or in a declarative
fashion where dependencies need to be mapped between objects.
Imperative ordering is finite and generally considered easier to write, but
declarative ordering is much more powerful and flexible but generally considered
@ -27,20 +27,17 @@ State Auto Ordering
.. versionadded: 0.17.0
Salt always executes states in a finite manner, meaning that they will always
execute in the same order regardless of the system that is executing them.
But in Salt 0.17.0, the ``state_auto_order`` option was added. This option
makes states get evaluated in the order in which they are defined in sls
files, including the top.sls file.
execute in the same order regardless of the system that is executing them. This
evaluation order makes it easy to know what order the states will be executed in,
but it is important to note that the requisite system will override the ordering
defined in the files, and the ``order`` option, described below, will also
override the order in which states are executed.
The evaluation order makes it easy to know what order the states will be
executed in, but it is important to note that the requisite system will
override the ordering defined in the files, and the ``order`` option described
below will also override the order in which states are defined in sls files.
If the classic ordering is preferred (lexicographic), then set
``state_auto_order`` to ``False`` in the master configuration file. Otherwise,
``state_auto_order`` defaults to ``True``.
This ordering system can be disabled in preference of lexicographic (classic)
ordering by setting the ``state_auto_order`` option to ``False`` in the master
configuration file. Otherwise, ``state_auto_order`` defaults to ``True``.
How compiler ordering is managed is described further in :ref:`compiler-ordering`.
.. _ordering_requisites: