mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
da161b9516
commit
992edc3bb8
4 changed files with 32 additions and 37 deletions
|
@ -2,4 +2,21 @@
|
|||
Logging Internals
|
||||
=================
|
||||
|
||||
TODO
|
||||
You can call the logger from custom modules to write messages to the minion
|
||||
logs. The following code snippet demonstrates getting access to the logger:
|
||||
|
||||
.. code-block:: python
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
log.info('here is some information')
|
||||
log.warning('you should not do that')
|
||||
log.error('it is busted')
|
||||
|
||||
For example, to write data to the minion log from a custom state:
|
||||
|
||||
1. Place the snippet above in a file called ``/srv/salt/_states/my_state.py``
|
||||
2. Sync states to your minion, ``salt <minion> saltutil.sync_states``.
|
||||
3. Apply the state, ``salt <minion> state.apply my_state``. This prints the
|
||||
messages to the minion logs.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
SUSE Installation
|
||||
=================
|
||||
|
||||
With openSUSE 13.1, Salt 0.16.4 has been available in the primary repositories.
|
||||
With openSUSE 13.2, Salt 2014.1.11 is available in the primary repositories.
|
||||
The devel:language:python repo will have more up to date versions of salt,
|
||||
all package development will be done there.
|
||||
|
||||
|
@ -109,30 +109,6 @@ For openSUSE 13.1 run the following as root:
|
|||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
For openSUSE 12.3 run the following as root:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
zypper addrepo http://download.opensuse.org/repositories/devel:languages:python/openSUSE_12.3/devel:languages:python.repo
|
||||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
For openSUSE 12.2 run the following as root:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
zypper addrepo http://download.opensuse.org/repositories/devel:languages:python/openSUSE_12.2/devel:languages:python.repo
|
||||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
For openSUSE 12.1 run the following as root:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
zypper addrepo http://download.opensuse.org/repositories/devel:languages:python/openSUSE_12.1/devel:languages:python.repo
|
||||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
For bleeding edge python Factory run the following as root:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -168,4 +144,4 @@ For SLE 11 SP2 run the following as root:
|
|||
zypper refresh
|
||||
zypper install salt salt-minion salt-master
|
||||
|
||||
Now go to the :doc:`Configuring Salt</ref/configuration/index>` page.
|
||||
Now go to the :doc:`Configuring Salt</ref/configuration/index>` page.
|
||||
|
|
|
@ -184,14 +184,15 @@ configuration file:
|
|||
.. code-block:: yaml
|
||||
|
||||
schedule:
|
||||
orchestrate:
|
||||
run_my_orch:
|
||||
function: state.orchestrate
|
||||
seconds: 35
|
||||
minutes: 30
|
||||
hours: 3
|
||||
hours: 6
|
||||
splay: 600
|
||||
args:
|
||||
- orchestration.my_orch
|
||||
|
||||
The above configuration will execute the state.orchestrate runner every 3 hours,
|
||||
30 minutes and 35 seconds, or every 12,635 seconds.
|
||||
The above configuration is analogous to running
|
||||
``salt-run state.orch orchestration.my_orch`` every 6 hours.
|
||||
|
||||
Scheduler With Returner
|
||||
=======================
|
||||
|
|
|
@ -174,19 +174,20 @@ def managed(name, **kwargs):
|
|||
|
||||
dist
|
||||
This dictates the release of the distro the packages should be built
|
||||
for. (e.g. unstable)
|
||||
for. (e.g. unstable). This option is rarely needed.
|
||||
|
||||
keyid
|
||||
The KeyID of the GPG key to install. This option also requires
|
||||
the 'keyserver' option to be set.
|
||||
the ``keyserver`` option to be set.
|
||||
|
||||
keyserver
|
||||
This is the name of the keyserver to retrieve gpg keys from. The
|
||||
keyid option must also be set for this option to work.
|
||||
``keyid`` option must also be set for this option to work.
|
||||
|
||||
key_url
|
||||
URL to retrieve a GPG key from. Allows the usage of ``http://``,
|
||||
``https://`` as well as ``salt://``.
|
||||
``https://`` as well as ``salt://``. Use either ``keyid``/``keyserver``
|
||||
or ``key_url``, but not both.
|
||||
|
||||
consolidate
|
||||
If set to true, this will consolidate all sources definitions to
|
||||
|
|
Loading…
Add table
Reference in a new issue