Remove trailing whitespace

This commit is contained in:
Colton Myers 2013-06-20 15:29:59 -06:00
parent d6b87c2d77
commit 7b84a2fe8d

View File

@ -18,9 +18,9 @@ your Python site-packages ``salt/pillars`` directory.
Configuration Configuration
------------- -------------
The external pillars that are called when a minion refreshes its pillars is The external pillars that are called when a minion refreshes its pillars is
controlled by the ``ext_pillar`` option in the Salt master configuration. You controlled by the ``ext_pillar`` option in the Salt master configuration. You
can pass a single argument, a list of arguments or a dictionary of arguments can pass a single argument, a list of arguments or a dictionary of arguments
to your pillar: to your pillar:
.. code-block:: yaml .. code-block:: yaml
@ -71,9 +71,9 @@ import errors and set a flag that the the ``__virtual__`` function can use later
Options Options
------- -------
If you define an ``__opts__`` dictionary, it will be merged into the If you define an ``__opts__`` dictionary, it will be merged into the
``__opts__`` dictionary handed to the ``ext_pillar`` function later. This is a ``__opts__`` dictionary handed to the ``ext_pillar`` function later. This is a
good place to put default configuration items. The convention is to name good place to put default configuration items. The convention is to name
things ``modulename.option``. things ``modulename.option``.
.. code-block:: python .. code-block:: python
@ -142,7 +142,7 @@ pillar this function is called.
How it is called depends on how it is configured in the Salt master How it is called depends on how it is configured in the Salt master
configuration. The first argument is always the current pillar dictionary, this configuration. The first argument is always the current pillar dictionary, this
contains pillar items that have already been added, starting with the data from contains pillar items that have already been added, starting with the data from
``pillar_roots``, and then from any already-ran external pillars. ``pillar_roots``, and then from any already-ran external pillars.
Using our example above: Using our example above:
@ -153,7 +153,7 @@ Using our example above:
ext_pillar( pillar, keyA='valueA', keyB='valueB' } ) # example_c ext_pillar( pillar, keyA='valueA', keyB='valueB' } ) # example_c
In the ``example_a`` case, ``pillar`` will contain the items from the In the ``example_a`` case, ``pillar`` will contain the items from the
``pillar_roots``, in ``example_b`` ``pillar`` will contain that plus the items ``pillar_roots``, in ``example_b`` ``pillar`` will contain that plus the items
added by ``example_a``, and in ``example_c`` ``pillar`` will contain that plus added by ``example_a``, and in ``example_c`` ``pillar`` will contain that plus
the items added by ``example_b``. the items added by ``example_b``.
@ -165,13 +165,13 @@ is called once for each minion that fetches its pillar data.
.. code-block:: python .. code-block:: python
def ext_pillar( pillar, *args, **kwargs ): def ext_pillar( pillar, *args, **kwargs ):
my_pillar = {} my_pillar = {}
# Do stuff # Do stuff
return my_pillar return my_pillar
You shouldn't just add items to ``pillar`` and return that, since that will You shouldn't just add items to ``pillar`` and return that, since that will
cause Salt to merge data that already exists. Rather, just return the items cause Salt to merge data that already exists. Rather, just return the items
@ -180,15 +180,15 @@ to make some decision based on pillar data that already exists.
This function has access to some useful globals: This function has access to some useful globals:
:__opts__: :__opts__:
A dictionary of mostly Salt configuration options. If you had an A dictionary of mostly Salt configuration options. If you had an
``__opts__`` dictionary defined in your module, those values will be ``__opts__`` dictionary defined in your module, those values will be
included. Also included and most useful is ``__opts__['id']``, which included. Also included and most useful is ``__opts__['id']``, which
is the minion id of the minion asking for pillar data. is the minion id of the minion asking for pillar data.
:__salt__: :__salt__:
A dictionary of Salt module functions, useful so you don't have to A dictionary of Salt module functions, useful so you don't have to
duplicate functions that already exist. E.g. duplicate functions that already exist. E.g.
``__salt__['cmd.run']( 'ls -l' )`` **Note**, runs on the *master* ``__salt__['cmd.run']( 'ls -l' )`` **Note**, runs on the *master*
:__grains__: :__grains__: