Commit Graph

49 Commits

Author SHA1 Message Date
Erik Johnson
0e37ad39c3
Add retcode documentation to orchestrate docs 2017-11-29 10:20:22 -06:00
Aneesh Agrawal
ba63920874 Support states returning a list for ret['comment']
Some states are complicated and multiple subparts,
or maybe cross-call into __states__ if they manage subresources.
In these cases, they will have multiple comments.
Make this more ergonomic by supporting a list of strings as the
value for ret['comment'] in state returns and documenting this.
By joining comments on newlines, it is possible to combine
single-line and multi-line comments cleanly, as opposed to e.g. commas.

The driving impetus for this is some of the boto modules.
An update to the boto_sqs module is included as an example.

Add a check that outgoing state return data has the right shape,
and add a testcase as well.
Fix the NPM state tests and the saltmod runner & wheel state functions
to comply with the prescribed format.
2017-09-05 19:52:42 +00:00
Aneesh Agrawal
1f82f90fc9 Document returning False in test=True mode
Currently, in test mode states always return None even on failure.
This masks failed states in highstate output,
which instead just look like they are going to make changes.

In some cases states can determine if they will fail even on a dry run,
e.g., if an API call to a service to determine the state of a
resource fails due to invalid credentials or a missing parameter.

In these cases, allow returning a result of False even in dry runs
to enable catching more errors at testing time.
2017-07-26 22:00:16 +00:00
rallytime
2b1ad9e9b9 Merge branch '2016.3' into 'develop'
Conflicts:
  - salt/utils/gitfs.py
2016-08-26 14:54:54 -06:00
Alexander Bauer
e4dfc21581 Trivial documentation spelling fix (#35800)
Change `statnds` to `stands` in State Writing documentation.
2016-08-26 10:30:08 -06:00
Nicole Thomas
6784cb036d Implement suggestions of bytes vs str type for #35593 (#35783)
* Implement suggestions of bytes vs str type for #35593

Refs #35593

* Str, not bytes
2016-08-25 15:45:51 -06:00
Mike Place
89bf5cf250 Developer documentation for Unicode handling (#35593)
* Developer documentation for Unicode handling

* Clarifications
2016-08-25 15:30:31 -06:00
Mike Place
500d4ccec2 Reminder not to return non-serializable data from states
Refs #31837
2016-06-03 12:13:47 -06:00
rallytime
32779b8d71 Merge branch '2015.8' into '2016.3'
Conflicts:
  - salt/modules/x509.py
2016-05-16 10:47:12 -06:00
Nicole Thomas
4f3596a69f Add comment for test=true w/o changes ret and add changes dict example (#33254)
Fixes #30258

Add simple changes dictionary example
2016-05-15 13:13:43 -07:00
rallytime
f6d9cdc633 Merge branch '2015.8' into '2016.3'
Conflicts:
  - doc/ref/states/compiler_ordering.rst
  - doc/topics/installation/suse.rst
  - doc/topics/jobs/schedule.rst
  - doc/topics/targeting/grains.rst
  - doc/topics/tutorials/preseed_key.rst
  - doc/topics/tutorials/states_pt5.rst
  - pkg/suse/use-forking-daemon.patch
  - salt/minion.py
  - salt/modules/pacman.py
  - salt/modules/state.py
  - salt/modules/yumpkg.py
2016-03-25 11:47:16 -06:00
rallytime
7554d0f42d Merge branch '2015.5' into '2015.8'
Conflicts:
  - doc/ref/states/include.rst
  - doc/topics/cloud/reactor.rst
  - doc/topics/reactor/index.rst
  - doc/topics/releases/2015.5.10.rst
  - doc/topics/tutorials/states_pt5.rst
  - doc/topics/windows/windows-package-manager.rst
  - salt/config.py
  - salt/modules/state.py
  - salt/states/grains.py
  - tests/integration/modules/sysmod.py
  - tests/unit/states/grains_test.py
2016-03-24 15:48:00 -06:00
Erik Johnson
1b97e4a3df Improve state module docs, replace references to state.highstate/state.sls with state.apply
Resolves #32037.
2016-03-21 22:56:17 -05:00
Colton Myers
26b6c92975 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/conf.py
    salt/config/__init__.py
    salt/modules/rh_ip.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/user.py
    salt/templates/rh_ip/rh7_eth.jinja
2015-09-17 11:10:37 -06:00
Colton Myers
274464a85b Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/topics/reactor/index.rst
    salt/cloud/clouds/digital_ocean_v2.py
    salt/modules/groupadd.py
    salt/modules/localemod.py
    salt/modules/mysql.py
    salt/modules/useradd.py
    salt/modules/win_pkg.py
    salt/modules/win_useradd.py
    salt/netapi/rest_cherrypy/app.py
    salt/pillar/s3.py
    salt/returners/local_cache.py
    salt/states/htpasswd.py
    salt/states/user.py
2015-09-14 14:39:03 -06:00
Colton Myers
307d3d05a4 Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    doc/man/salt.7
    salt/modules/yumpkg.py
2015-09-03 14:24:45 -06:00
Jacob Hammons
ac3bd47440 states/pkgrepo examples, suse installation updates
Refs #26644
Refs #26638
2015-09-02 11:37:40 -06:00
Colton Myers
1e1f5f3a95 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    doc/conf.py
    doc/topics/cloud/config.rst
    doc/topics/cloud/index.rst
    salt/modules/git.py
    salt/states/git.py
    salt/states/pkgrepo.py
2015-09-01 15:35:21 -06:00
Colton Myers
278e8dda5b Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/gce.py
2015-09-01 15:15:13 -06:00
Jacob Hammons
0ec036350d Updates to salt-ssh and salt-key
#24510
2015-08-31 20:00:30 -06:00
Jacob Hammons
45c1ff3543 Add doc for __states__ to writing states topic and 2015.8 release notes. Also added a missing line in release notes for git module updates.
Refs #21214
2015-08-31 13:51:31 -06:00
Colton Myers
1b0b21394e Merge remote-tracking branch 'upstream/2015.8' into merge-forward-develop
Conflicts:
    salt/cloud/clouds/vmware.py
    salt/modules/win_system.py
2015-08-10 13:27:31 -06:00
Thomas S Hatch
0e705d2185 add pchanges docs 2015-08-08 09:32:29 -06:00
Colton Myers
a4d4f8c5f8 Merge remote-tracking branch 'upstream/2015.5' into merge-forward-2015.8
Conflicts:
    salt/cloud/clouds/linode.py
    salt/modules/layman.py
    salt/modules/win_system.py
2015-08-05 15:30:04 -06:00
Justin Findlay
a83059ca01 fix test mode logic in state docs 2015-08-05 11:29:56 -06:00
Justin Findlay
0fd180e106 add test logic to state reult doc 2015-08-05 09:36:08 -06:00
John Syrinek
663b19e5b7 Improves example illustrating SLS-to-Python mapping 2015-03-30 14:04:05 -05:00
Thomas Jackson
8df54973c3 Comma cleanup 2014-12-12 11:34:51 -08:00
Thomas Jackson
d12677156e Whitespace cleanup 2014-12-11 07:53:19 -08:00
Jeremy Rosenbaum
4668480dff fixes inconsistent bar/baz variable name in state module example 2014-10-01 21:53:45 -07:00
Erik Johnson
2849950bce Docs cleanup
Fixes double-colons by making them code-block directives, so they do not
erroneously show up as "PYTHON" blocks. Also corrects a few instances of
2nd person pronoun usage.
2014-07-13 11:02:33 -05:00
Seth House
e222a9bd1c Add missing True return to state example when state is already correct 2014-04-15 15:51:43 -06:00
Pedro Algarvio
2b2754d683 Don't encourage bad **kwargs usage. 2014-04-13 14:38:04 +01:00
Seth House
640f613364 Added a full but simplistic example of writing a state module 2014-04-11 14:08:53 -06:00
Mike Place
a485eceac9 Fix all broken links in docs. Ignore certain known-good links. Adjust many links that are returning 301.
Conflicts:
	doc/topics/installation/index.rst
2014-02-20 16:16:59 -07:00
Erik Johnson
fa6170d9f4 Add explanation of the kwargs passed to states 2013-08-01 19:48:23 -05:00
Erik Johnson
1b876fc53a Clarify docs on custom types 2013-07-08 21:36:34 -05:00
Gary Wilson Jr
bd499e5640 Fixed several minor misspellings and acronym capitalizations. 2013-03-18 16:42:57 -05:00
Erik Johnson
d14d859154 Minor tweaks to doc headings
Corrected odd grammar on the Modules doc page, and changed a similar
heading in the States docs to match the same wording.
2013-02-10 22:20:56 -06:00
Erik Johnson
d4b120a003 Replace hard-coded links w/relative ":mod:" links 2013-02-03 14:54:04 -06:00
Erik Johnson
5def1dd54c Updated docs for grains, modules, and states
Added links to module function documentation, as well as to
"file_roots", and mentioned the saltutil.sync_* functions. Will probably
do the same for returners and renderers soon. This should help people
navigate through the docs easier.
2012-12-18 23:29:36 -06:00
Alec Koumjian
a22773bdde Instruct authors of state modules to check for the test parameter 2012-07-03 14:17:52 -07:00
L.C. Rees
3315dad9e7 documentation updates 2012-05-22 22:43:12 -06:00
Gordon McAllister
72c2014767 War on typos
Also cleanup whitespace and break some long lines
2012-03-14 17:09:19 -07:00
Thomas S Hatch
bb58d17c8b Add more docs to the state writing document 2012-02-17 12:52:29 -07:00
Alec Koumjian
987e155d88 mentioning location to place custom states 2012-02-06 12:32:21 -08:00
Erik Johnson
6a6ca5f753 added missing period 2012-01-29 20:08:40 -06:00
Erik Johnson
e2eaef1f44 1) Fixed syntax error affecting yaml code block. 2) A couple grammmar fixes. 3) Added section on return data for states 2012-01-29 19:48:45 -06:00
Thomas S Hatch
dfe041d146 Add state wrting doc - still needs some love 2011-12-04 23:29:03 -07:00