mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2019.2' into merge-singleton-last-ref-close-fluorine
This commit is contained in:
commit
63f051af16
6 changed files with 99 additions and 17 deletions
|
@ -6,16 +6,16 @@ Configuring the Salt Master
|
|||
|
||||
The Salt system is amazingly simple and easy to configure, the two components
|
||||
of the Salt system each have a respective configuration file. The
|
||||
:command:`salt-master` is configured via the master configuration file, and the
|
||||
:command:`salt-minion` is configured via the minion configuration file.
|
||||
``salt-master`` is configured via the master configuration file, and the
|
||||
``salt-minion`` is configured via the minion configuration file.
|
||||
|
||||
.. seealso::
|
||||
|
||||
:ref:`Example master configuration file <configuration-examples-master>`.
|
||||
|
||||
The configuration file for the salt-master is located at
|
||||
:file:`/etc/salt/master` by default. A notable exception is FreeBSD, where the
|
||||
configuration file is located at :file:`/usr/local/etc/salt`. The available
|
||||
options are as follows:
|
||||
The configuration file for the salt-master is located at ``/etc/salt/master``
|
||||
by default. A notable exception is FreeBSD, where the configuration file is
|
||||
located at ``/usr/local/etc/salt``. The available options are as follows:
|
||||
|
||||
|
||||
.. _primary-master-configuration:
|
||||
|
@ -749,6 +749,22 @@ accessible from the minions.
|
|||
|
||||
master_job_cache: redis
|
||||
|
||||
.. conf_master:: job_cache_store_endtime
|
||||
|
||||
``job_cache_store_endtime``
|
||||
---------------------------
|
||||
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
Default: ``False``
|
||||
|
||||
Specify whether the Salt Master should store end times for jobs as returns
|
||||
come in.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
job_cache_store_endtime: False
|
||||
|
||||
.. conf_master:: enforce_mine_cache
|
||||
|
||||
``enforce_mine_cache``
|
||||
|
@ -4666,6 +4682,55 @@ The queue size for workers in the reactor.
|
|||
reactor_worker_hwm: 10000
|
||||
|
||||
|
||||
.. _salt-api-master-settings:
|
||||
|
||||
Salt-API Master Settings
|
||||
========================
|
||||
|
||||
There are some settings for :ref:`salt-api <netapi-introduction>` that can be
|
||||
configured on the Salt Master.
|
||||
|
||||
.. conf_master:: api_logfile
|
||||
|
||||
``api_logfile``
|
||||
---------------
|
||||
|
||||
Default: ``/var/log/salt/api``
|
||||
|
||||
The logfile location for ``salt-api``.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
api_logfile: /var/log/salt/api
|
||||
|
||||
.. conf_master:: api_pidfile
|
||||
|
||||
``api_pidfile``
|
||||
---------------
|
||||
|
||||
Default: /var/run/salt-api.pid
|
||||
|
||||
If this master will be running ``salt-api``, specify the pidfile of the
|
||||
``salt-api`` daemon.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
api_pidfile: /var/run/salt-api.pid
|
||||
|
||||
.. conf_master:: rest_timeout
|
||||
|
||||
``rest_timeout``
|
||||
----------------
|
||||
|
||||
Default: ``300``
|
||||
|
||||
Used by ``salt-api`` for the master requests timeout.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
rest_timeout: 300
|
||||
|
||||
|
||||
.. _syndic-server-settings:
|
||||
|
||||
Syndic Server Settings
|
||||
|
@ -5040,6 +5105,9 @@ Node Groups
|
|||
|
||||
.. conf_master:: nodegroups
|
||||
|
||||
``nodegroups``
|
||||
--------------
|
||||
|
||||
Default: ``{}``
|
||||
|
||||
Node groups allow for logical groupings of minion nodes.
|
||||
|
|
|
@ -2852,7 +2852,8 @@ def create(vm_):
|
|||
log.debug('config_spec set to:\n%s', pprint.pformat(config_spec))
|
||||
|
||||
event_kwargs = vm_.copy()
|
||||
del event_kwargs['password']
|
||||
if event_kwargs.get('password'):
|
||||
del event_kwargs['password']
|
||||
|
||||
try:
|
||||
__utils__['cloud.fire_event'](
|
||||
|
|
|
@ -1824,7 +1824,7 @@ def get_repo_keys():
|
|||
|
||||
# The double usage of '--with-fingerprint' is necessary in order to
|
||||
# retrieve the fingerprint of the subkey.
|
||||
cmd = ['apt-key', 'adv', '--list-public-keys', '--with-fingerprint',
|
||||
cmd = ['apt-key', 'adv', '--batch', '--list-public-keys', '--with-fingerprint',
|
||||
'--with-fingerprint', '--with-colons', '--fixed-list-mode']
|
||||
|
||||
cmd_ret = _call_apt(cmd, scope=False)
|
||||
|
@ -1924,7 +1924,7 @@ def add_repo_key(path=None, text=None, keyserver=None, keyid=None, saltenv='base
|
|||
error_msg = 'No keyid or keyid too short for keyserver: {0}'.format(keyserver)
|
||||
raise SaltInvocationError(error_msg)
|
||||
|
||||
cmd.extend(['adv', '--keyserver', keyserver, '--recv', keyid])
|
||||
cmd.extend(['adv', '--batch', '--keyserver', keyserver, '--recv', keyid])
|
||||
elif keyid:
|
||||
error_msg = 'No keyserver specified for keyid: {0}'.format(keyid)
|
||||
raise SaltInvocationError(error_msg)
|
||||
|
@ -2227,10 +2227,10 @@ def mod_repo(repo, saltenv='base', **kwargs):
|
|||
if not imported:
|
||||
http_proxy_url = _get_http_proxy_url()
|
||||
if http_proxy_url and keyserver not in no_proxy:
|
||||
cmd = ['apt-key', 'adv', '--keyserver-options', 'http-proxy={0}'.format(http_proxy_url),
|
||||
cmd = ['apt-key', 'adv', '--batch', '--keyserver-options', 'http-proxy={0}'.format(http_proxy_url),
|
||||
'--keyserver', keyserver, '--logger-fd', '1', '--recv-keys', key]
|
||||
else:
|
||||
cmd = ['apt-key', 'adv', '--keyserver', keyserver,
|
||||
cmd = ['apt-key', 'adv', '--batch', '--keyserver', keyserver,
|
||||
'--logger-fd', '1', '--recv-keys', key]
|
||||
ret = _call_apt(cmd, scope=False, **kwargs)
|
||||
if ret['retcode'] != 0:
|
||||
|
|
|
@ -522,6 +522,10 @@ def _cmp_attrs(path, attrs):
|
|||
'''
|
||||
diff = [None, None]
|
||||
|
||||
# lsattr for AIX is not the same thing as lsattr for linux.
|
||||
if salt.utils.platform.is_aix():
|
||||
return None
|
||||
|
||||
try:
|
||||
lattrs = lsattr(path).get(path, '')
|
||||
except AttributeError:
|
||||
|
@ -544,6 +548,9 @@ def lsattr(path):
|
|||
.. versionadded:: 2018.3.0
|
||||
.. versionchanged:: 2018.3.1
|
||||
If ``lsattr`` is not installed on the system, ``None`` is returned.
|
||||
.. versionchanged:: 2018.3.4
|
||||
If on ``AIX``, ``None`` is returned even if in filesystem as lsattr on ``AIX``
|
||||
is not the same thing as the linux version.
|
||||
|
||||
Obtain the modifiable attributes of the given file. If path
|
||||
is to a directory, an empty list is returned.
|
||||
|
@ -557,7 +564,7 @@ def lsattr(path):
|
|||
|
||||
salt '*' file.lsattr foo1.txt
|
||||
'''
|
||||
if not salt.utils.path.which('lsattr'):
|
||||
if not salt.utils.path.which('lsattr') or salt.utils.platform.is_aix():
|
||||
return None
|
||||
|
||||
if not os.path.exists(path):
|
||||
|
@ -4471,7 +4478,9 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
|
|||
|
||||
is_dir = os.path.isdir(name)
|
||||
is_link = os.path.islink(name)
|
||||
if not salt.utils.platform.is_windows() and not is_dir and not is_link:
|
||||
if attrs is not None \
|
||||
and not salt.utils.platform.is_windows() \
|
||||
and not is_dir and not is_link:
|
||||
try:
|
||||
lattrs = lsattr(name)
|
||||
except SaltInvocationError:
|
||||
|
|
|
@ -349,8 +349,8 @@ def set_date(name, date):
|
|||
|
||||
salt '*' shadow.set_date username 0
|
||||
'''
|
||||
cmd = 'chage -d {0} {1}'.format(date, name)
|
||||
return not __salt__['cmd.run'](cmd, python_shell=False)
|
||||
cmd = ['chage', '-d', date, name]
|
||||
return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
|
||||
|
||||
|
||||
def set_expire(name, expire):
|
||||
|
@ -367,8 +367,8 @@ def set_expire(name, expire):
|
|||
|
||||
salt '*' shadow.set_expire username -1
|
||||
'''
|
||||
cmd = 'chage -E {0} {1}'.format(expire, name)
|
||||
return not __salt__['cmd.run'](cmd, python_shell=False)
|
||||
cmd = ['chage', '-E', expire, name]
|
||||
return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
|
||||
|
||||
|
||||
def list_users():
|
||||
|
|
4
setup.py
4
setup.py
|
@ -126,6 +126,7 @@ SALT_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'base.t
|
|||
SALT_ZEROMQ_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'zeromq.txt')
|
||||
SALT_RAET_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'raet.txt')
|
||||
SALT_WINDOWS_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'windows', 'req.txt')
|
||||
SALT_LONG_DESCRIPTION_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), 'README.rst')
|
||||
|
||||
# Salt SSH Packaging Detection
|
||||
PACKAGED_FOR_SALT_SSH_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), '.salt-ssh-package')
|
||||
|
@ -854,6 +855,9 @@ class SaltDistribution(distutils.dist.Distribution):
|
|||
self.name = 'salt-ssh' if PACKAGED_FOR_SALT_SSH else 'salt'
|
||||
self.salt_version = __version__ # pylint: disable=undefined-variable
|
||||
self.description = 'Portable, distributed, remote execution and configuration management system'
|
||||
with open(SALT_LONG_DESCRIPTION_FILE) as f:
|
||||
self.long_description = f.read()
|
||||
self.long_description_content_type = 'text/x-rst'
|
||||
self.author = 'Thomas S Hatch'
|
||||
self.author_email = 'thatch45@gmail.com'
|
||||
self.url = 'http://saltstack.org'
|
||||
|
|
Loading…
Add table
Reference in a new issue