Last active
January 27, 2017 08:26
-
-
Save anlutro/cd0c16d1d23d55ded19b to your computer and use it in GitHub Desktop.
Illustration of states vs modules and function arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in a /srv/salt .sls file | |
my_state: <- State ID | |
file.managed: <- State function | |
- name: /tmp/foo | |
- contents: hello world | |
^ state function arguments | |
{% if salt['file.directory_exists']('/tmp/bar') %} | |
^ module function ^ module function arguments | |
# on the command line | |
salt minion-name test.ping | |
^ module functions | |
v | |
salt minion-name state.apply test=True | |
^ module function arguments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Technically "state functions" should be "state module functions" and "module functions" should be "execution module functions", but they're more commonly referred to just states and modules.