3
\me @ s U d Z ddlZddlZddlmZ ddlmZmZmZ ddl m
Z
ddlmZ ddl
mZmZ ddlmZ dd lmZ d
Zddd
eegeedgdgdZeeeZ ejeZG dd dZeee
eddddZdS )z&Salt Minion: Setup and run salt minion N)dedent)safeyamlsubputil)Cloud)Config)
MetaSchemaget_meta_doc)ALL_DISTROS)PER_INSTANCEa. 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``.
Salt keys can be manually generated by: ``salt-key --gen-keys=GEN_KEYS``,
where ``GEN_KEYS`` is the name of the keypair, e.g. 'minion'. The keypair
will be copied to ``/etc/salt/pki`` on the minion instance.
Zcc_salt_minionzSalt MinionzSetup and run salt minionai salt_minion:
pkg_name: salt-minion
service_name: salt-minion
config_dir: /etc/salt
conf:
file_client: local
fileserver_backend:
- gitfs
gitfs_remotes:
- https://github.com/_user_/_repo_.git
master: salt.example.com
grains:
role:
- web
public_key: |
------BEGIN PUBLIC KEY-------