Viewing File: /usr/lib/python2.7/site-packages/cloudinit/config/cc_salt_minion.pyc

ó
oBú]c@sKdZddlZddlmZmZdefd„ƒYZd„ZdS(sù
Salt Minion
-----------
**Summary:** set up and run salt minion

This module installs, configures and starts salt minion. If the ``salt_minion``
key is present in the config parts, then salt minion will be installed and
started. Configuration for salt minion can be specified in the ``conf`` key
under ``salt_minion``. Any conf values present there will be assigned in
``/etc/salt/minion``. The public and private keys to use for salt minion can be
specified with ``public_key`` and ``private_key`` respectively. Optionally if
you have a custom package name, service name or config directory you can
specify them with ``pkg_name``, ``service_name`` and ``config_dir``.

**Internal name:** ``cc_salt_minion``

**Module frequency:** per instance

**Supported distros:** all

**Config keys**::

    salt_minion:
        pkg_name: 'salt-minion'
        service_name: 'salt-minion'
        config_dir: '/etc/salt'
        conf:
            master: salt.example.com
        grains:
            role:
                - web
        public_key: |
            ------BEGIN PUBLIC KEY-------
            <key data>
            ------END PUBLIC KEY-------
        private_key: |
            ------BEGIN PRIVATE KEY------
            <key data>
            ------END PRIVATE KEY-------
iÿÿÿÿN(tsafeyamltutilt
SaltConstantscBseZdZd„ZRS(s>
    defines default distribution specific salt variables
    cCsštjƒr*d|_d|_d|_nd|_d|_d|_tj|d|jƒ|_tj|d|jƒ|_tj|d|jƒ|_dS(	Ns	py36-salttsalt_minions/usr/local/etc/saltssalt-minions	/etc/salttpkg_namet
config_dirtservice_name(Rt
is_FreeBSDRtsrv_nametconf_dirtget_cfg_option_str(tselftcfg((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_salt_minion.pyt__init__:s					(t__name__t
__module__t__doc__R
(((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_salt_minion.pyR6sc	Cs,d|kr |jd|ƒdS|d}td|ƒ}|jj|jƒtj|jƒd|kr«tj	j
|jdƒ}tj|j
dƒƒ}tj||ƒnd|krútj	j
|jdƒ}	tj|j
dƒƒ}
tj|	|
ƒnd|krád|krátj	j
|jd	ƒ}tj	j|ƒsWtj	j
|jd
ƒ}n|j
d|ƒ}tjdƒdtj|ƒtj	j
|d
ƒ}
tj	j
|dƒ}tj|
|dƒtj||dƒWdQXn|jjdkr	|jjddƒntjd|jdgdtƒdS(NRs?Skipping module named %s, no 'salt_minion' key in configurationRtconftminiontgrainst
public_keytprivate_keys
pki/miniontpkitpki_diri?s
minion.pubs
minion.pemtfreebsdtsalt_minion_enabletYEStservicetrestarttcapture(tdebugRtdistrotinstall_packagesRRt
ensure_dirR	tostpathtjoinRtdumpstgett
write_filetisdirtumasktosfamilytupdatercconftsubpRtFalse(tnameRtcloudtlogt_argsts_cfgtconstt
minion_configtminion_datat
grains_configtgrains_datatpki_dir_defaultRtpub_nametpem_name((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_salt_minion.pythandlePs<	

(RR"t	cloudinitRRtobjectRR;(((sC/usr/lib/python2.7/site-packages/cloudinit/config/cc_salt_minion.pyt<module>,s
Back to Directory File Manager