Merge pull request #14930 from whiteinge/doc-event-fire_master_env-sudo

Update event.fire_master_env docstring with sudo instructions
This commit is contained in:
Thomas S Hatch 2014-08-13 10:38:39 -06:00
commit 2aa208f636

View file

@ -109,6 +109,21 @@ def fire_master_env(tag, data=None, preload=None):
salt-call event.fire_master_env myco/jenkins/build/success
A convenient way to allow Jenkins to execute ``salt-call`` is via sudo. The
following rule in sudoers will allow the ``jenkins`` user to run only the
following command.
``/etc/sudoers`` (allow preserving the environment):
.. code-block:: text
jenkins ALL=(ALL) NOPASSWD:SETENV: /usr/bin/salt-call event.fire_master_env*
Call Jenkins via sudo (preserve the environment):
.. code-block:: bash
sudo -E salt-call event.fire_master_env myco/jenkins/build/success
'''
env_dict = {}
env_dict.update(os.environ)