mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #16246 from rallytime/pillar_docs
Add note on how to set pillar data on the command line to pillar tutorial
This commit is contained in:
commit
ea5c8518db
1 changed files with 28 additions and 0 deletions
|
@ -295,6 +295,34 @@ Where the vimrc source location can now be changed via pillar:
|
|||
|
||||
Ensuring that the right vimrc is sent out to the correct minions.
|
||||
|
||||
Setting Pillar Data on the Command Line
|
||||
=======================================
|
||||
|
||||
Pillar data can be set on the command line like so:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' state.highstate pillar='{"foo": "bar"}'
|
||||
|
||||
The ``state.sls`` command can also be used to set pillar values via the command
|
||||
line:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' state.sls my_sls_file pillar='{"hello": "world"}'
|
||||
|
||||
Lists can be passed in pillar as well:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
salt '*' state.highstate pillar='["foo", "bar", "baz"]'
|
||||
|
||||
.. note::
|
||||
|
||||
If a key is passed on the command line that already exists on the minion,
|
||||
the key that is passed in will overwrite the entire value of that key,
|
||||
rather than merging only the specified value set via the command line.
|
||||
|
||||
More On Pillar
|
||||
==============
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue