Add binary pillar to the docs

This commit is contained in:
Wayne Werner 2019-03-26 19:58:29 -05:00
parent f2aebf9cb5
commit fb010c0a6e
No known key found for this signature in database
GPG key ID: C36D3A8D5BEF0935

View file

@ -747,6 +747,34 @@ done:
.. _`minion config file`: https://github.com/saltstack/salt/tree/develop/doc/ref/configuration/minion.rst
.. _`master config template`: https://github.com/saltstack/salt/tree/develop/conf/master
Binary Data in the Pillar
=========================
Salt has partial support for binary pillar data.
.. note::
There are some situations (such as salt-ssh) where only text (ASCII or
Unicode) is allowed.
The simplest way to embed binary data in your pillar is to make use of YAML's
built-in binary data type, which requires base64 encoded data.
.. code-block:: yaml
salt_pic: !!binary
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAA
Then you can use it as a ``contents_pillar`` in a state:
.. code-block:: yaml
/tmp/salt.png:
file.managed:
- contents_pillar: salt_pic
It is also possible to add ASCII-armored encrypted data to pillars, as
mentioned in the Pillar Encryption section.
Master Config in Pillar
=======================