2012-10-25 15:30:28 -06:00
.. _configuration-salt-master:
2011-10-30 10:04:21 -06:00
===========================
Configuring the Salt Master
===========================
2011-05-23 14:51:31 +08:00
The Salt system is amazingly simple and easy to configure, the two components
of the Salt system each have a respective configuration file. The
2018-11-29 09:00:45 -05:00
`` salt-master `` is configured via the master configuration file, and the
`` salt-minion `` is configured via the minion configuration file.
2011-05-23 14:51:31 +08:00
2012-01-18 23:04:48 -06:00
.. seealso ::
2018-11-29 09:00:45 -05:00
2016-04-25 15:26:09 -06:00
:ref: `Example master configuration file <configuration-examples-master>` .
2011-05-23 14:51:31 +08:00
2018-11-29 09:00:45 -05:00
The configuration file for the salt-master is located at `` /etc/salt/master ``
2020-10-08 10:54:41 +01:00
by default. Atomic included configuration files can be placed in
`` /etc/salt/master.d/*.conf `` . Warning: files with other suffixes than .conf will
2019-09-12 12:02:27 +02:00
not be included. A notable exception is FreeBSD, where the configuration file is
2018-11-29 09:00:45 -05:00
located at `` /usr/local/etc/salt `` . The available options are as follows:
2011-05-23 14:51:31 +08:00
2017-06-14 15:15:46 -06:00
.. _primary-master-configuration:
2011-05-30 22:16:25 -06:00
Primary Master Configuration
2013-08-07 23:50:51 +01:00
============================
2011-05-23 14:51:31 +08:00
.. conf_master :: interface
`` interface ``
-------------
Default: `` 0.0.0.0 `` (all interfaces)
2017-02-02 07:35:00 -08:00
The local interface to bind to, must be an IP address.
2011-05-23 14:51:31 +08:00
.. code-block :: yaml
interface: 192.168.0.1
2014-01-10 05:54:07 +00:00
.. conf_master :: ipv6
`` ipv6 ``
--------
Default: `` False ``
Whether the master should listen for IPv6 connections. If this is set to True,
2016-11-30 12:32:36 +02:00
the interface option must be adjusted too (for example: `` interface: '::' `` )
2014-01-10 05:54:07 +00:00
.. code-block :: yaml
ipv6: True
2011-05-23 14:51:31 +08:00
.. conf_master :: publish_port
`` publish_port ``
----------------
Default: `` 4505 ``
2014-10-09 10:14:37 -06:00
The network port to set up the publication interface.
2011-05-23 14:51:31 +08:00
.. code-block :: yaml
publish_port: 4505
2014-08-01 16:38:22 -07:00
.. conf_master :: master_id
`` master_id ``
2016-03-31 13:50:51 -06:00
-------------
2014-08-01 16:38:22 -07:00
Default: `` None ``
The id to be passed in the publish job to minions. This is used for MultiSyndics
2014-10-09 10:14:37 -06:00
to return the job to the requesting master.
2014-12-10 19:37:16 -08:00
.. note ::
2014-10-09 10:14:37 -06:00
This must be the same string as the syndic is configured with.
2014-08-01 16:38:22 -07:00
.. code-block :: yaml
master_id: MasterOfMaster
2012-10-11 23:01:18 -06:00
2012-01-18 23:04:48 -06:00
.. conf_master :: user
`` user ``
2012-05-22 22:43:12 -06:00
--------
2012-01-18 23:04:48 -06:00
Default: `` root ``
The user to run the Salt processes
.. code-block :: yaml
user: root
2011-05-23 14:51:31 +08:00
.. conf_master :: ret_port
2017-11-16 15:32:18 -07:00
`` enable_ssh_minions ``
----------------------
2017-11-16 14:31:37 -07:00
2017-11-16 17:28:33 -07:00
2017-11-16 14:31:37 -07:00
Default: `` False ``
2017-12-18 12:21:24 -07:00
Tell the master to also use salt-ssh when running commands against minions.
2017-11-16 14:31:37 -07:00
.. code-block :: yaml
2017-11-16 15:32:18 -07:00
enable_ssh_minions: True
.. note ::
2017-12-18 12:21:24 -07:00
Cross-minion communication is still not possible. The Salt mine and
2017-11-16 15:32:18 -07:00
publish.publish do not work between minion types.
2017-11-16 14:31:37 -07:00
2011-05-23 14:51:31 +08:00
`` ret_port ``
------------
Default: `` 4506 ``
The port used by the return server, this is the server used by Salt to receive
execution returns and command executions.
.. code-block :: yaml
ret_port: 4506
2012-10-11 23:01:18 -06:00
.. conf_master :: pidfile
`` pidfile ``
-----------
Default: `` /var/run/salt-master.pid ``
2014-10-09 10:14:37 -06:00
Specify the location of the master pidfile.
2012-10-11 23:01:18 -06:00
.. code-block :: yaml
pidfile: /var/run/salt-master.pid
2012-01-13 12:35:56 -07:00
.. conf_master :: root_dir
`` root_dir ``
------------
2016-03-31 13:50:51 -06:00
Default: `` / ``
2012-01-13 12:35:56 -07:00
2012-03-08 21:08:45 -07:00
The system root directory to operate from, change this to make Salt run from
2014-02-04 15:46:22 -06:00
an alternative root.
2012-01-13 12:35:56 -07:00
2012-01-15 22:36:49 -07:00
.. code-block :: yaml
2012-01-13 12:35:56 -07:00
root_dir: /
2014-02-04 15:46:22 -06:00
.. note ::
This directory is prepended to the following options:
:conf_master:`pki_dir` , :conf_master:`cachedir` , :conf_master:`sock_dir` ,
:conf_master:`log_file` , :conf_master:`autosign_file` ,
2017-10-10 15:03:18 +02:00
:conf_master:`autoreject_file` , :conf_master:`pidfile` ,
:conf_master:`autosign_grains_dir` .
2014-02-04 15:46:22 -06:00
2016-05-17 10:58:20 -06:00
.. conf_master :: conf_file
`` conf_file ``
-------------
Default: `` /etc/salt/master ``
The path to the master's configuration file.
.. code-block :: yaml
conf_file: /etc/salt/master
2011-05-23 14:51:31 +08:00
.. conf_master :: pki_dir
`` pki_dir ``
-----------
2022-09-27 19:45:56 +02:00
Default: `` <LIB_STATE_DIR>/pki/master ``
2011-05-23 14:51:31 +08:00
The directory to store the pki authentication keys.
2022-09-27 19:45:56 +02:00
`` <LIB_STATE_DIR> `` is the pre-configured variable state directory set during
installation via `` --salt-lib-state-dir `` . It defaults to `` /etc/salt `` . Systems
following the Filesystem Hierarchy Standard (FHS) might set it to
`` /var/lib/salt `` .
2011-05-23 14:51:31 +08:00
.. code-block :: yaml
2016-03-31 13:50:51 -06:00
pki_dir: /etc/salt/pki/master
2011-05-23 14:51:31 +08:00
2014-03-07 15:11:00 -08:00
.. conf_master :: extension_modules
`` extension_modules ``
---------------------
2016-02-10 15:45:28 -07:00
.. versionchanged :: 2016.3.0
2016-07-14 14:55:41 +03:00
2016-01-26 14:11:12 -06:00
The default location for this directory has been moved. Prior to this
version, the location was a directory named `` extmods `` in the Salt
cachedir (on most platforms, `` /var/cache/salt/extmods `` ). It has been
moved into the master cachedir (on most platforms,
`` /var/cache/salt/master/extmods `` ).
2023-03-23 12:09:15 -07:00
Directory where custom modules are synced to. This directory can contain
2023-03-23 10:47:21 -07:00
subdirectories for each of Salt's module types such as `` runners `` ,
`` output `` , `` wheel `` , `` modules `` , `` states `` , `` returners `` , `` engines `` ,
`` utils `` , etc. This path is appended to :conf_master:`root_dir` .
Note, any directories or files not found in the `module_dirs` location
will be removed from the extension_modules path.
2014-03-07 15:11:00 -08:00
.. code-block :: yaml
2016-01-26 14:11:12 -06:00
extension_modules: /root/salt_extmods
2014-03-07 15:11:00 -08:00
2017-07-05 10:17:52 -06:00
.. conf_master :: extmod_whitelist
.. conf_master :: extmod_blacklist
2017-02-13 12:19:55 -06:00
`` extmod_whitelist/extmod_blacklist ``
2017-05-06 23:04:08 -05:00
-------------------------------------
2017-02-08 14:41:39 -06:00
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-08 14:41:39 -06:00
By using this dictionary, the modules that are synced to the master's extmod cache using `saltutil.sync_*` can be
limited. If nothing is set to a specific type, then all modules are accepted. To block all modules of a specific type,
whitelist an empty list.
.. code-block :: yaml
extmod_whitelist:
modules:
- custom_module
engines:
- custom_engine
pillars: []
2017-02-13 12:19:55 -06:00
extmod_blacklist:
modules:
- specific_module
2017-02-08 14:41:39 -06:00
Valid options:
- modules
- states
- grains
- renderers
- returners
- output
- proxy
- runners
- wheel
- engines
- queues
- pillar
- utils
2017-02-08 14:43:40 -06:00
- sdb
2017-02-27 12:14:59 -06:00
- cache
2017-05-07 20:29:22 -06:00
- clouds
- tops
2017-05-12 13:36:15 -06:00
- roster
2017-08-22 12:31:00 +05:30
- tokens
2017-02-08 14:41:39 -06:00
2017-01-23 20:38:03 -06:00
.. conf_master :: module_dirs
2015-05-04 13:00:31 -04:00
`` module_dirs ``
---------------
Default: `` [] ``
Like `` extension_modules `` , but a list of extra directories to search
for Salt modules.
.. code-block :: yaml
module_dirs:
- /var/cache/salt/minion/extmods
2011-05-23 14:51:31 +08:00
.. conf_master :: cachedir
`` cachedir ``
------------
2016-03-31 13:50:51 -06:00
Default: `` /var/cache/salt/master ``
2011-05-23 14:51:31 +08:00
The location used to store cache information, particularly the job information
for executed salt commands.
2015-04-03 17:17:06 -06:00
This directory may contain sensitive data and should be protected accordingly.
2011-05-23 14:51:31 +08:00
.. code-block :: yaml
2016-03-31 13:50:51 -06:00
cachedir: /var/cache/salt/master
2011-05-23 14:51:31 +08:00
2014-01-10 05:54:07 +00:00
.. conf_master :: verify_env
`` verify_env ``
--------------
Default: `` True ``
Verify and set permissions on configuration directories at startup.
.. code-block :: yaml
verify_env: True
2011-05-30 22:16:25 -06:00
.. conf_master :: keep_jobs
`` keep_jobs ``
-------------
Default: `` 24 ``
2016-05-20 14:48:40 -06:00
Set the number of hours to keep old job information. Note that setting this option
to `` 0 `` disables the cache cleaner.
2011-05-30 22:16:25 -06:00
2022-11-05 00:04:59 -07:00
.. deprecated :: 3006
Replaced by :conf_master:`keep_jobs_seconds`
2016-03-31 13:50:51 -06:00
.. code-block :: yaml
keep_jobs: 24
2022-11-05 00:04:59 -07:00
.. conf_master :: keep_jobs_seconds
`` keep_jobs_seconds ``
---------------------
Default: `` 86400 ``
Set the number of seconds to keep old job information. Note that setting this option
to `` 0 `` disables the cache cleaner.
.. code-block :: yaml
keep_jobs_seconds: 86400
2016-05-17 10:58:20 -06:00
.. conf_master :: gather_job_timeout
`` gather_job_timeout ``
----------------------
.. versionadded :: 2014.7.0
Default: `` 10 ``
The number of seconds to wait when the client is requesting information
about running jobs.
.. code-block :: yaml
gather_job_timeout: 10
2014-01-10 05:54:07 +00:00
.. conf_master :: timeout
`` timeout ``
-----------
Default: `` 5 ``
2014-07-15 12:09:52 +02:00
Set the default timeout for the salt command and api.
2014-01-10 05:54:07 +00:00
.. conf_master :: loop_interval
`` loop_interval ``
-----------------
Default: `` 60 ``
2023-03-24 18:07:07 -07:00
The loop_interval option controls the seconds for the master's Maintenance
2014-01-10 05:54:07 +00:00
process check cycle. This process updates file server backends, cleans the
job cache and executes the scheduler.
2023-03-24 18:07:07 -07:00
`` maintenance_interval ``
------------------------
.. versionadded :: 3006.0
Default: `` 3600 ``
Defines how often to restart the master's Maintenance process.
.. code-block :: yaml
maintenance_interval: 9600
2014-01-10 05:54:07 +00:00
.. conf_master :: output
`` output ``
----------
Default: `` nested ``
Set the default outputter used by the salt command.
2017-06-15 16:21:47 -06:00
.. conf_master :: outputter_dirs
`` outputter_dirs ``
------------------
Default: `` [] ``
A list of additional directories to search for salt outputters in.
.. code-block :: yaml
outputter_dirs: []
2016-07-16 12:45:55 -06:00
.. conf_master :: output_file
`` output_file ``
---------------
Default: None
2016-08-19 16:05:40 -06:00
Set the default output file used by the salt command. Default is to output
to the CLI and not to a file. Functions the same way as the "--out-file"
2016-07-16 12:45:55 -06:00
CLI option, only sets this to a single file for all salt commands.
.. code-block :: yaml
output_file: /path/output/file
2017-06-15 16:21:47 -06:00
.. conf_master :: show_timeout
`` show_timeout ``
----------------
Default: `` True ``
Tell the client to show minions that have timed out.
.. code-block :: yaml
show_timeout: True
.. conf_master :: show_jid
`` show_jid ``
------------
Default: `` False ``
Tell the client to display the jid when a job is published.
.. code-block :: yaml
show_jid: False
2014-01-10 05:54:07 +00:00
.. conf_master :: color
`` color ``
---------
Default: `` True ``
By default output is colored, to disable colored output set the color value
2014-10-09 10:14:37 -06:00
to False.
2014-01-10 05:54:07 +00:00
.. code-block :: yaml
color: False
2017-12-09 14:17:09 +01:00
.. conf_master :: color_theme
`` color_theme ``
2018-06-06 00:49:37 -05:00
---------------
2017-12-09 14:17:09 +01:00
Default: `` "" ``
Specifies a path to the color theme to use for colored command line output.
.. code-block :: yaml
color_theme: /etc/salt/color_theme
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. conf_master :: cli_summary
`` cli_summary ``
---------------
Default: `` False ``
When set to `` True `` , displays a summary of the number of minions targeted,
the number of minions returned, and the number of minions that did not
return.
.. code-block :: yaml
cli_summary: False
2014-01-12 05:23:09 +00:00
.. conf_master :: sock_dir
`` sock_dir ``
------------
Default: :file: `/var/run/salt/master`
Set the location to use for creating Unix sockets for master process
2014-10-09 10:14:37 -06:00
communication.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
sock_dir: /var/run/salt/master
.. conf_master :: enable_gpu_grains
`` enable_gpu_grains ``
---------------------
2018-08-18 13:44:24 +10:00
Default: `` False ``
2014-01-12 05:23:09 +00:00
2015-06-12 11:23:52 -06:00
Enable GPU hardware data for your master. Be aware that the master can
take a while to start up when lspci and/or dmidecode is used to populate the
grains for the master.
2014-01-12 05:23:09 +00:00
2018-08-28 11:39:53 -05:00
.. code-block :: yaml
enable_gpu_grains: True
2020-02-08 17:40:22 +01:00
.. conf_master :: skip_grains
`` skip_grains ``
---------------------
Default: `` False ``
MasterMinions should omit grains. A MasterMinion is "a minion function object
for generic use on the master" that omit pillar. A RunnerClient creates a
MasterMinion omitting states and renderer. Setting to True can improve master
performance.
.. code-block :: yaml
2020-02-11 20:03:31 +01:00
2020-02-08 17:40:22 +01:00
skip_grains: True
2012-06-13 15:50:31 -06:00
.. conf_master :: job_cache
`` job_cache ``
-------------
Default: `` True ``
2016-05-20 14:48:40 -06:00
The master maintains a temporary job cache. While this is a great addition, it
can be a burden on the master for larger deployments (over 5000 minions).
2012-06-13 15:50:31 -06:00
Disabling the job cache will make previously executed jobs unavailable to
the jobs system and is not generally recommended. Normally it is wise to make
sure the master has access to a faster IO system or a tmpfs is mounted to the
2014-10-09 10:14:37 -06:00
jobs dir.
2012-06-13 15:50:31 -06:00
2016-05-20 14:48:40 -06:00
.. code-block :: yaml
job_cache: True
.. note ::
Setting the `` job_cache `` to `` False `` will not cache minion returns, but
the JID directory for each job is still created. The creation of the JID
directories is necessary because Salt uses those directories to check for
JID collisions. By setting this option to `` False `` , the job cache
directory, which is `` /var/cache/salt/master/jobs/ `` by default, will be
smaller, but the JID directories will still be present.
2022-11-05 00:04:59 -07:00
Note that the :conf_master:`keep_jobs_seconds` option can be set to a lower
value, such as `` 3600 `` , to limit the number of seconds jobs are stored in
the job cache. (The default is 86400 seconds.)
2016-05-20 14:48:40 -06:00
Please see the :ref: `Managing the Job Cache <managing_the_job_cache>`
documentation for more information.
2014-01-12 05:23:09 +00:00
.. conf_master :: minion_data_cache
`` minion_data_cache ``
---------------------
Default: `` True ``
The minion data cache is a cache of information about the minions stored on the
2016-12-20 19:32:48 +03:00
master, this information is primarily the pillar, grains and mine data. The data
is cached via the cache subsystem in the Master cachedir under the name of the
minion or in a supported database. The data is used to predetermine what minions
are expected to reply from executions.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
minion_data_cache: True
2016-12-20 19:32:48 +03:00
.. conf_master :: cache
`` cache ``
2017-03-24 14:25:46 -06:00
---------
2016-12-20 19:32:48 +03:00
Default: `` localfs ``
Cache subsystem module to use for minion data cache.
.. code-block :: yaml
cache: consul
2017-04-03 19:48:04 +03:00
.. conf_master :: memcache_expire_seconds
`` memcache_expire_seconds ``
---------------------------
Default: `` 0 ``
Memcache is an additional cache layer that keeps a limited amount of data
fetched from the minion data cache for a limited period of time in memory that
2018-03-08 10:42:02 +01:00
makes cache operations faster. It doesn't make much sense for the `` localfs ``
2017-04-03 19:48:04 +03:00
cache driver but helps for more complex drivers like `` consul `` .
This option sets the memcache items expiration time. By default is set to `` 0 ``
that disables the memcache.
.. code-block :: yaml
memcache_expire_seconds: 30
.. conf_master :: memcache_max_items
`` memcache_max_items ``
----------------------
Default: `` 1024 ``
Set memcache limit in items that are bank-key pairs. I.e the list of
minion_0/data, minion_0/mine, minion_1/data contains 3 items. This value depends
on the count of minions usually targeted in your environment. The best one could
be found by analyzing the cache log with `` memcache_debug `` enabled.
.. code-block :: yaml
memcache_max_items: 1024
.. conf_master :: memcache_full_cleanup
`` memcache_full_cleanup ``
-------------------------
Default: `` False ``
If cache storage got full, i.e. the items count exceeds the
2020-02-26 00:57:58 +03:00
`` memcache_max_items `` value, memcache cleans up its storage. If this option
set to `` False `` memcache removes the only one oldest value from its storage.
2017-04-03 19:48:04 +03:00
If this set set to `` True `` memcache removes all the expired items and also
removes the oldest one if there are no expired items.
.. code-block :: yaml
memcache_full_cleanup: True
.. conf_master :: memcache_debug
`` memcache_debug ``
------------------
Default: `` False ``
Enable collecting the memcache stats and log it on `debug` log level. If enabled
memcache collect information about how many `` fetch `` calls has been done and
how many of them has been hit by memcache. Also it outputs the rate value that
is the result of division of the first two values. This should help to choose
right values for the expiration time and the cache size.
.. code-block :: yaml
memcache_debug: True
2013-02-02 15:47:04 -07:00
.. conf_master :: ext_job_cache
`` ext_job_cache ``
-----------------
2014-01-03 19:22:44 -06:00
Default: `` '' ``
2013-02-02 15:47:04 -07:00
2016-03-31 13:50:51 -06:00
Used to specify a default returner for all minions. When this option is set,
2013-02-02 15:47:04 -07:00
the specified returner needs to be properly configured and the minions will
2013-02-04 09:40:21 -07:00
always default to sending returns to this returner. This will also disable the
2014-10-09 10:14:37 -06:00
local job cache on the master.
2013-02-02 15:47:04 -07:00
.. code-block :: yaml
ext_job_cache: redis
2015-03-31 13:59:11 -06:00
.. conf_master :: event_return
`` event_return ``
2016-03-31 13:50:51 -06:00
----------------
2015-03-31 13:59:11 -06:00
2015-05-06 09:27:40 -05:00
.. versionadded :: 2015.5.0
2015-04-07 14:15:03 -06:00
2015-03-31 13:59:11 -06:00
Default: `` '' ``
2016-07-26 15:47:10 -04:00
Specify the returner(s) to use to log events. Each returner may have
2016-08-01 23:04:05 -05:00
installation and configuration requirements. Read the returner's
2016-07-26 15:47:10 -04:00
documentation.
2015-03-31 13:59:11 -06:00
2015-07-21 16:42:39 -05:00
.. note ::
2015-03-31 13:59:11 -06:00
2015-07-21 16:42:39 -05:00
Not all returners support event returns. Verify that a returner has an
2015-03-31 13:59:11 -06:00
`` event_return() `` function before configuring this option with a returner.
.. code-block :: yaml
2016-08-01 23:04:05 -05:00
event_return:
2016-07-26 15:47:10 -04:00
- syslog
- splunk
2015-03-31 13:59:11 -06:00
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. conf_master :: event_return_queue
`` event_return_queue ``
----------------------
.. versionadded :: 2015.5.0
Default: `` 0 ``
On busy systems, enabling event_returns can cause a considerable load on
the storage system for returners. Events can be queued on the master and
stored in a batched fashion using a single transaction for multiple events.
By default, events are not queued.
.. code-block :: yaml
event_return_queue: 0
.. conf_master :: event_return_whitelist
`` event_return_whitelist ``
--------------------------
.. versionadded :: 2015.5.0
Default: `` [] ``
Only return events matching tags in a whitelist.
2016-10-27 15:26:30 -06:00
.. versionchanged :: 2016.11.0
2016-07-14 14:55:41 +03:00
Supports glob matching patterns.
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. code-block :: yaml
event_return_whitelist:
- salt/master/a_tag
2016-07-14 14:55:41 +03:00
- salt/run/*/ret
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. conf_master :: event_return_blacklist
`` event_return_blacklist ``
--------------------------
.. versionadded :: 2015.5.0
Default: `` [] ``
Store all event returns _except_ the tags in a blacklist.
2016-10-27 15:26:30 -06:00
.. versionchanged :: 2016.11.0
2016-07-14 14:55:41 +03:00
Supports glob matching patterns.
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. code-block :: yaml
event_return_blacklist:
- salt/master/not_this_tag
2016-07-14 14:55:41 +03:00
- salt/wheel/*/ret
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
2016-05-17 10:58:20 -06:00
.. conf_master :: max_event_size
`` max_event_size ``
------------------
.. versionadded :: 2014.7.0
Default: `` 1048576 ``
Passing very large events can cause the minion to consume large amounts of
memory. This value tunes the maximum size of a message allowed onto the
master event bus. The value is expressed in bytes.
.. code-block :: yaml
max_event_size: 1048576
2014-09-05 11:55:11 -06:00
.. conf_master :: master_job_cache
`` master_job_cache ``
--------------------
2015-09-18 16:08:47 -06:00
.. versionadded :: 2014.7.0
2014-09-05 11:55:11 -06:00
2016-03-31 13:50:51 -06:00
Default: `` local_cache ``
2014-09-05 11:55:11 -06:00
2014-09-22 14:23:07 -07:00
Specify the returner to use for the job cache. The job cache will only be
2014-09-05 11:55:11 -06:00
interacted with from the salt master and therefore does not need to be
2014-09-22 14:23:07 -07:00
accessible from the minions.
2014-09-05 11:55:11 -06:00
.. code-block :: yaml
master_job_cache: redis
2018-11-29 09:30:46 -05:00
.. 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
2013-07-01 11:42:51 -06:00
.. conf_master :: enforce_mine_cache
2013-06-25 23:42:09 +03:00
`` enforce_mine_cache ``
2013-07-01 11:42:51 -06:00
----------------------
2013-06-25 23:42:09 +03:00
Default: False
By-default when disabling the minion_data_cache mine will stop working since
it is based on cached data, by enabling this option we explicitly enabling
only the cache for the mine system.
.. code-block :: yaml
enforce_mine_cache: False
2014-09-05 11:55:11 -06:00
.. conf_master :: max_minions
2014-05-30 07:56:58 -07:00
`` max_minions ``
---------------
Default: 0
2015-11-04 12:15:41 +01:00
The maximum number of minion connections allowed by the master. Use this to
accommodate the number of minions per master if you have different types of
hardware serving your minions. The default of `` 0 `` means unlimited connections.
2016-04-04 12:36:14 -06:00
Please note that this can slow down the authentication process a bit in large
2015-11-04 12:15:41 +01:00
setups.
2014-05-30 07:56:58 -07:00
.. code-block :: yaml
max_minions: 100
2014-09-18 14:26:49 +02:00
`` con_cache ``
-------------
Default: False
If max_minions is used in large installations, the master might experience
high-load situations because of having to check the number of connected
minions for every authentication. This cache provides the minion-ids of
all connected minions to all MWorker-processes and greatly improves the
performance of max_minions.
.. code-block :: yaml
con_cache: True
2014-09-05 11:55:11 -06:00
.. conf_master :: presence_events
2014-05-30 06:51:03 -07:00
`` presence_events ``
2016-02-24 16:56:52 -07:00
-------------------
2014-05-30 06:51:03 -07:00
Default: False
2015-03-01 19:54:22 -07:00
Causes the master to periodically look for actively connected minions.
:ref: `Presence events <event-master_presence>` are fired on the event bus on a
regular interval with a list of connected minions, as well as events with lists
of newly connected or disconnected minions. This is a master-only operation
2018-06-19 13:55:09 -04:00
that does not send executions to minions.
2014-05-30 06:51:03 -07:00
.. code-block :: yaml
presence_events: False
2021-07-26 12:22:19 -04:00
`` detect_remote_minions ``
-------------------------
Default: False
When checking the minions connected to a master, also include the master's
2021-11-01 10:50:59 +01:00
connections to minions on the port specified in the setting `remote_minions_port` .
2021-07-26 12:22:19 -04:00
This is particularly useful when checking if the master is connected to any Heist-Salt
minions. If this setting is set to True, the master will check all connections on port 22
by default unless a user also configures a different port with the setting
`remote_minions_port` .
Changing this setting will check the remote minions the master is connected to when using
presence events, the manage runner, and any other parts of the code that call the
`connected_ids` method to check the status of connected minions.
.. code-block :: yaml
detect_remote_minions: True
`` remote_minions_port ``
-----------------------
Default: 22
The port to use when checking for remote minions when `detect_remote_minions` is set
to True.
.. code-block :: yaml
remote_minions_port: 2222
2017-06-15 16:21:47 -06:00
.. conf_master :: ping_on_rotate
`` ping_on_rotate ``
------------------
2018-06-06 00:49:37 -05:00
.. versionadded :: 2014.7.0
2017-06-15 16:21:47 -06:00
Default: `` False ``
By default, the master AES key rotates every 24 hours. The next command
following a key rotation will trigger a key refresh from the minion which may
result in minions which do not respond to the first command after a key refresh.
To tell the master to ping all minions immediately after an AES key refresh,
set `` ping_on_rotate `` to `` True `` . This should mitigate the issue where a
minion does not appear to initially respond after a key is rotated.
2018-06-06 00:49:37 -05:00
Note that enabling this may cause high load on the master immediately after the
key rotation event as minions reconnect. Consider this carefully if this salt
master is managing a large number of minions.
2017-06-15 16:21:47 -06:00
If disabled, it is recommended to handle this event by listening for the
`` aes_key_rotate `` event with the `` key `` tag and acting appropriately.
.. code-block :: yaml
ping_on_rotate: False
2016-02-24 16:56:52 -07:00
.. conf_master :: transport
`` transport ``
-------------
2016-02-25 09:38:41 -07:00
Default: `` zeromq ``
2016-02-24 16:56:52 -07:00
2016-02-25 09:38:41 -07:00
Changes the underlying transport layer. ZeroMQ is the recommended transport
2016-02-24 16:56:52 -07:00
while additional transport layers are under development. Supported values are
2018-10-05 10:48:14 -04:00
`` zeromq `` and `` tcp `` (experimental). This setting has a significant impact on
performance and should not be changed unless you know what you are doing!
2016-02-24 16:56:52 -07:00
.. code-block :: yaml
transport: zeromq
2015-05-04 15:00:28 -06:00
2017-06-28 10:48:37 -06:00
.. conf_master :: transport_opts
2016-04-29 08:59:05 -07:00
`` transport_opts ``
2016-05-17 10:24:44 -06:00
------------------
2016-04-29 08:59:05 -07:00
Default: `` {} ``
2018-05-28 16:13:12 -05:00
(experimental) Starts multiple transports and overrides options for each
transport with the provided dictionary This setting has a significant impact on
performance and should not be changed unless you know what you are doing! The
following example shows how to start a TCP transport alongside a ZMQ transport.
2016-04-29 08:59:05 -07:00
.. code-block :: yaml
transport_opts:
tcp:
publish_port: 4605
ret_port: 4606
zeromq: []
2017-11-30 11:40:40 -07:00
.. conf_master :: master_stats
`` master_stats ``
----------------
Default: False
Turning on the master stats enables runtime throughput and statistics events
to be fired from the master event bus. These events will report on what
functions have been run on the master and how long these runs have, on
average, taken over a given period of time.
.. conf_master :: master_stats_event_iter
`` master_stats_event_iter ``
---------------------------
Default: 60
The time in seconds to fire master_stats events. This will only fire in
conjunction with receiving a request to the master, idle masters will not
fire these events.
2017-06-28 10:48:37 -06:00
.. conf_master :: sock_pool_size
2017-05-31 14:45:48 +09:00
`` sock_pool_size ``
------------------
Default: 1
To avoid blocking waiting while writing a data to a socket, we support
socket pool for Salt applications. For example, a job with a large number
of target host list can cause long period blocking waiting. The option
is used by ZMQ and TCP transports, and the other transport methods don't
need the socket pool by definition. Most of Salt tools, including CLI,
are enough to use a single bucket of socket pool. On the other hands,
it is highly recommended to set the size of socket pool larger than 1
for other Salt applications, especially Salt API, which must write data
to socket concurrently.
.. code-block :: yaml
sock_pool_size: 15
2017-07-14 17:26:02 -06:00
.. conf_master :: ipc_mode
`` ipc_mode ``
------------
Default: `` ipc ``
The ipc strategy. (i.e., sockets versus tcp, etc.) Windows platforms lack
POSIX IPC and must rely on TCP based inter-process communications. `` ipc_mode ``
is set to `` tcp `` by default on Windows.
.. code-block :: yaml
ipc_mode: ipc
2022-10-10 15:14:08 +03:00
.. conf_master :: ipc_write_buffer
`` ipc_write_buffer ``
-----------------------
Default: `` 0 ``
The maximum size of a message sent via the IPC transport module can be limited
dynamically or by sharing an integer value lower than the total memory size. When
the value `` dynamic `` is set, salt will use 2.5% of the total memory as
`` ipc_write_buffer `` value (rounded to an integer). A value of `` 0 `` disables
this option.
.. code-block :: yaml
ipc_write_buffer: 10485760
2017-11-07 10:24:56 +02:00
.. conf_master :: tcp_master_pub_port
2017-07-14 17:26:02 -06:00
`` tcp_master_pub_port ``
-----------------------
Default: `` 4512 ``
The TCP port on which events for the master should be published if `` ipc_mode `` is TCP.
.. code-block :: yaml
tcp_master_pub_port: 4512
.. conf_master :: tcp_master_pull_port
`` tcp_master_pull_port ``
------------------------
Default: `` 4513 ``
The TCP port on which events for the master should be pulled if `` ipc_mode `` is TCP.
.. code-block :: yaml
tcp_master_pull_port: 4513
.. conf_master :: tcp_master_publish_pull
`` tcp_master_publish_pull ``
---------------------------
Default: `` 4514 ``
The TCP port on which events for the master should be pulled fom and then republished onto
the event bus on the master.
.. code-block :: yaml
tcp_master_publish_pull: 4514
.. conf_master :: tcp_master_workers
`` tcp_master_workers ``
----------------------
Default: `` 4515 ``
The TCP port for `` mworkers `` to connect to on the master.
.. code-block :: yaml
tcp_master_workers: 4515
2018-01-08 13:53:56 -08:00
.. conf_master :: auth_events
2018-01-05 12:29:21 -08:00
`` auth_events ``
2020-05-20 12:26:09 -06:00
---------------
2018-01-05 12:29:21 -08:00
2018-01-08 13:53:56 -08:00
.. versionadded :: 2017.7.3
2018-01-05 12:29:21 -08:00
Default: `` True ``
Determines whether the master will fire authentication events.
:ref: `Authentication events <event-master_auth>` are fired when
a minion performs an authentication check with the master.
.. code-block :: yaml
auth_events: True
2017-06-14 15:15:46 -06:00
2018-01-09 15:52:16 -07:00
.. conf_master :: minion_data_cache_events
`` minion_data_cache_events ``
2018-05-28 16:13:12 -05:00
----------------------------
2018-01-09 15:52:16 -07:00
.. versionadded :: 2017.7.3
Default: `` True ``
Determines whether the master will fire minion data cache events. Minion data
cache events are fired when a minion requests a minion data cache refresh.
.. code-block :: yaml
minion_data_cache_events: True
2017-06-14 15:15:46 -06:00
2018-02-19 13:25:58 +01:00
.. conf_master :: http_connect_timeout
`` http_connect_timeout ``
------------------------
2019-01-07 18:03:19 -05:00
.. versionadded :: 2019.2.0
2018-02-19 13:25:58 +01:00
Default: `` 20 ``
HTTP connection timeout in seconds.
Applied when fetching files using tornado back-end.
Should be greater than overall download time.
.. code-block :: yaml
http_connect_timeout: 20
.. conf_master :: http_request_timeout
`` http_request_timeout ``
------------------------
.. versionadded :: 2015.8.0
Default: `` 3600 ``
HTTP request timeout in seconds.
Applied when fetching files using tornado back-end.
Should be greater than overall download time.
.. code-block :: yaml
http_request_timeout: 3600
2019-11-25 11:07:18 -04:00
`` use_yamlloader_old ``
2020-05-20 12:26:09 -06:00
----------------------
2019-11-25 11:07:18 -04:00
.. versionadded :: 2019.2.1
Default: `` False ``
Use the pre-2019.2 YAML renderer.
Uses legacy YAML rendering to support some legacy inline data structures.
See the :ref: `2019.2.1 release notes <release-2019-2-1>` for more details.
.. code-block :: yaml
use_yamlloader_old: False
2018-12-18 18:13:48 -05:00
.. conf_master :: req_server_niceness
`` req_server_niceness ``
2020-05-20 12:26:09 -06:00
-----------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
Default: `` None ``
Process priority level of the ReqServer subprocess of the master.
Supported on POSIX platforms only.
.. code-block :: yaml
req_server_niceness: 9
.. conf_master :: pub_server_niceness
`` pub_server_niceness ``
2020-05-20 12:26:09 -06:00
-----------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
Default: `` None ``
Process priority level of the PubServer subprocess of the master.
Supported on POSIX platforms only.
.. code-block :: yaml
pub_server_niceness: 9
.. conf_master :: fileserver_update_niceness
`` fileserver_update_niceness ``
2020-05-19 08:56:55 -06:00
------------------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
Default: `` None ``
Process priority level of the FileServerUpdate subprocess of the master.
Supported on POSIX platforms only.
.. code-block :: yaml
fileserver_update_niceness: 9
.. conf_master :: maintenance_niceness
`` maintenance_niceness ``
------------------------
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
Default: `` None ``
Process priority level of the Maintenance subprocess of the master.
Supported on POSIX platforms only.
.. code-block :: yaml
maintenance_niceness: 9
.. conf_master :: mworker_niceness
`` mworker_niceness ``
2020-05-20 12:26:09 -06:00
--------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
Default: `` None ``
Process priority level of the MWorker subprocess of the master.
Supported on POSIX platforms only.
.. code-block :: yaml
mworker_niceness: 9
.. conf_master :: mworker_queue_niceness
`` mworker_queue_niceness ``
2020-05-20 12:26:09 -06:00
--------------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
default: `` None ``
process priority level of the MWorkerQueue subprocess of the master.
supported on POSIX platforms only.
.. code-block :: yaml
mworker_queue_niceness: 9
.. conf_master :: event_return_niceness
`` event_return_niceness ``
2020-05-20 12:26:09 -06:00
-------------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
default: `` None ``
process priority level of the EventReturn subprocess of the master.
supported on POSIX platforms only.
.. code-block :: yaml
event_return_niceness: 9
.. conf_master :: event_publisher_niceness
`` event_publisher_niceness ``
2020-05-20 12:26:09 -06:00
----------------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
default: `` none ``
process priority level of the EventPublisher subprocess of the master.
supported on POSIX platforms only.
.. code-block :: yaml
event_publisher_niceness: 9
.. conf_master :: reactor_niceness
`` reactor_niceness ``
2020-05-20 12:26:09 -06:00
--------------------
2018-12-18 18:13:48 -05:00
2020-07-12 11:10:14 +07:00
.. versionadded :: 3001
2018-12-18 18:13:48 -05:00
default: `` None ``
process priority level of the Reactor subprocess of the master.
supported on POSIX platforms only.
.. code-block :: yaml
reactor_niceness: 9
2017-06-14 15:15:46 -06:00
.. _salt-ssh-configuration:
2015-05-04 15:05:21 -06:00
Salt-SSH Configuration
======================
2015-05-04 15:00:28 -06:00
2017-10-12 11:42:23 +02:00
.. conf_master :: roster
`` roster ``
---------------
Default: `` flat ``
Define the default salt-ssh roster module to use
.. code-block :: yaml
roster: cache
2018-05-28 16:13:12 -05:00
.. conf_master :: roster_defaults
`` roster_defaults ``
-------------------
.. versionadded :: 2017.7.0
Default settings which will be inherited by all rosters.
.. code-block :: yaml
roster_defaults:
user: daniel
sudo: True
priv: /root/.ssh/id_rsa
tty: True
2014-09-05 11:55:11 -06:00
.. conf_master :: roster_file
`` roster_file ``
---------------
2016-02-24 16:56:52 -07:00
Default: `` /etc/salt/roster ``
2014-09-05 11:55:11 -06:00
2018-06-06 00:49:37 -05:00
Pass in an alternative location for the salt-ssh :py:mod:`flat
<salt.roster.flat> ` roster file.
2014-09-05 11:55:11 -06:00
.. code-block :: yaml
roster_file: /root/roster
2013-08-07 23:50:51 +01:00
2018-06-06 00:49:37 -05:00
.. conf_master :: rosters
2017-10-12 11:42:23 +02:00
`` rosters ``
2018-06-06 00:49:37 -05:00
-----------
2017-10-12 11:42:23 +02:00
2018-06-06 00:49:37 -05:00
Default: `` None ``
2017-10-12 11:42:23 +02:00
2018-06-06 00:49:37 -05:00
Define locations for :py:mod: `flat <salt.roster.flat>` roster files so they can
be chosen when using Salt API. An administrator can place roster files into
these locations. Then, when calling Salt API, the :conf_master:`roster_file`
parameter should contain a relative path to these locations. That is,
`` roster_file=/foo/roster `` will be resolved as
`` /etc/salt/roster.d/foo/roster `` etc. This feature prevents passing insecure
custom rosters through the Salt API.
2017-10-12 11:42:23 +02:00
.. code-block :: yaml
rosters:
- /etc/salt/roster.d
- /opt/salt/some/more/rosters
2017-06-15 16:21:47 -06:00
.. conf_master :: ssh_passwd
`` ssh_passwd ``
--------------
Default: `` '' ``
The ssh password to log in with.
.. code-block :: yaml
ssh_passwd: ''
2018-04-24 10:48:29 +08:00
.. conf_master :: ssh_priv_passwd
`` ssh_priv_passwd ``
2018-06-06 20:19:44 -05:00
-------------------
2018-04-24 10:48:29 +08:00
Default: `` '' ``
Passphrase for ssh private key file.
.. code-block :: yaml
ssh_priv_passwd: ''
2017-06-15 16:21:47 -06:00
.. conf_master :: ssh_port
`` ssh_port ``
------------
Default: `` 22 ``
The target system's ssh port number.
.. code-block :: yaml
ssh_port: 22
.. conf_master :: ssh_scan_ports
`` ssh_scan_ports ``
------------------
Default: `` 22 ``
Comma-separated list of ports to scan.
.. code-block :: yaml
ssh_scan_ports: 22
.. conf_master :: ssh_scan_timeout
`` ssh_scan_timeout ``
--------------------
Default: `` 0.01 ``
Scanning socket timeout for salt-ssh.
.. code-block :: yaml
ssh_scan_timeout: 0.01
.. conf_master :: ssh_sudo
`` ssh_sudo ``
------------
Default: `` False ``
Boolean to run command via sudo.
.. code-block :: yaml
ssh_sudo: False
.. conf_master :: ssh_timeout
`` ssh_timeout ``
---------------
Default: `` 60 ``
Number of seconds to wait for a response when establishing an SSH connection.
.. code-block :: yaml
ssh_timeout: 60
.. conf_master :: ssh_user
`` ssh_user ``
------------
Default: `` root ``
The user to log in as.
.. code-block :: yaml
ssh_user: root
2016-11-20 16:13:55 +02:00
.. conf_master :: ssh_log_file
`` ssh_log_file ``
2017-02-03 15:32:42 -07:00
----------------
2016-11-20 16:13:55 +02:00
.. versionadded :: 2016.3.5
Default: `` /var/log/salt/ssh ``
Specify the log file of the `` salt-ssh `` command.
.. code-block :: yaml
ssh_log_file: /var/log/salt/ssh
2015-05-04 15:00:28 -06:00
.. conf_master :: ssh_minion_opts
`` ssh_minion_opts ``
-------------------
Default: None
Pass in minion option overrides that will be inserted into the SHIM for
2015-05-04 15:05:21 -06:00
salt-ssh calls. The local minion config is not used for salt-ssh. Can be
overridden on a per-minion basis in the roster (`` minion_opts `` )
2015-05-04 15:00:28 -06:00
.. code-block :: yaml
2016-04-26 13:52:09 -06:00
ssh_minion_opts:
2015-05-04 15:00:28 -06:00
gpg_keydir: /root/gpg
2017-06-15 16:21:47 -06:00
.. conf_master :: ssh_use_home_key
2016-04-26 13:52:09 -06:00
`` ssh_use_home_key ``
--------------------
Default: False
Set this to True to default to using `` ~/.ssh/id_rsa `` for salt-ssh
authentication with minions
.. code-block :: yaml
ssh_use_home_key: False
2015-05-04 15:00:28 -06:00
2017-06-15 16:21:47 -06:00
.. conf_master :: ssh_identities_only
`` ssh_identities_only ``
-----------------------
Default: `` False ``
Set this to `` True `` to default salt-ssh to run with `` -o IdentitiesOnly=yes `` . This
option is intended for situations where the ssh-agent offers many different identities
and allows ssh to ignore those identities and use the only one specified in options.
.. code-block :: yaml
ssh_identities_only: False
.. conf_master :: ssh_list_nodegroups
`` ssh_list_nodegroups ``
-----------------------
Default: `` {} ``
List-only nodegroups for salt-ssh. Each group must be formed as either a comma-separated
list, or a YAML list. This option is useful to group minions into easy-to-target groups
when using salt-ssh. These groups can then be targeted with the normal -N argument to
salt-ssh.
.. code-block :: yaml
ssh_list_nodegroups:
groupA: minion1,minion2
groupB: minion1,minion3
2020-04-06 13:21:02 -04:00
.. conf_master :: ssh_run_pre_flight
Default: False
2020-04-09 16:20:23 -04:00
Run the ssh_pre_flight script defined in the salt-ssh roster. By default
2020-04-06 13:21:02 -04:00
the script will only run when the thin dir does not exist on the targeted
minion. This will force the script to run and not check if the thin dir
exists first.
2017-06-15 16:21:47 -06:00
.. conf_master :: thin_extra_mods
2016-09-26 14:24:41 +02:00
`` thin_extra_mods ``
-------------------
Default: None
List of additional modules, needed to be included into the Salt Thin.
Pass a list of importable Python modules that are typically located in
the `site-packages` Python directory so they will be also always included
into the Salt Thin, once generated.
`` min_extra_mods ``
------------------
Default: None
Identical as `thin_extra_mods` , only applied to the Salt Minimal.
2016-09-30 16:10:33 -06:00
2017-06-14 15:15:46 -06:00
.. _master-security-settings:
2011-05-30 22:16:25 -06:00
Master Security Settings
2013-08-07 23:50:51 +01:00
========================
2011-05-30 22:16:25 -06:00
2011-05-23 14:51:31 +08:00
.. conf_master :: open_mode
`` open_mode ``
-------------
Default: `` False ``
Open mode is a dangerous security feature. One problem encountered with pki
authentication systems is that keys can become "mixed up" and authentication
begins to fail. Open mode turns off authentication and tells the master to
2011-07-27 17:46:53 -06:00
accept all authentication. This will clean up the pki keys received from the
2012-03-08 21:05:52 -07:00
minions. Open mode should not be turned on for general use. Open mode should
2011-05-23 14:51:31 +08:00
only be used for a short period of time to clean up pki keys. To turn on open
2012-03-08 21:05:52 -07:00
mode set this value to `` True `` .
2011-05-23 14:51:31 +08:00
.. code-block :: yaml
open_mode: False
2011-05-30 22:16:25 -06:00
.. conf_master :: auto_accept
`` auto_accept ``
---------------
Default: `` False ``
2012-03-08 21:05:52 -07:00
Enable auto_accept. This setting will automatically accept all incoming
2013-11-21 17:12:31 -06:00
public keys from minions.
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
auto_accept: False
2017-07-14 17:26:02 -06:00
.. conf_master :: keysize
`` keysize ``
-----------
Default: `` 2048 ``
The size of key that should be generated when creating new keys.
.. code-block :: yaml
keysize: 2048
2014-05-10 13:46:03 -04:00
.. conf_master :: autosign_timeout
`` autosign_timeout ``
2014-05-14 10:23:48 -06:00
--------------------
2014-05-10 13:46:03 -04:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-05-10 13:46:03 -04:00
Default: `` 120 ``
2014-05-13 11:32:28 -06:00
Time in minutes that a incoming public key with a matching name found in
2014-05-10 13:46:03 -04:00
pki_dir/minion_autosign/keyid is automatically accepted. Expired autosign keys
are removed when the master checks the minion_autosign directory. This method
2014-05-13 11:32:28 -06:00
to auto accept minions can be safer than an autosign_file because the
2014-05-10 13:46:03 -04:00
keyid record can expire and is limited to being an exact name match.
2014-05-13 11:32:28 -06:00
This should still be considered a less than secure option, due to the fact
that trust is based on just the requesting minion id.
2014-05-10 13:46:03 -04:00
2012-08-24 16:20:19 +01:00
.. conf_master :: autosign_file
`` autosign_file ``
-----------------
2013-11-21 17:12:31 -06:00
Default: `` not defined ``
2012-08-24 16:20:19 +01:00
2013-11-21 17:12:31 -06:00
If the `` autosign_file `` is specified incoming keys specified in the autosign_file
will be automatically accepted. Matches will be searched for first by string
2014-05-13 11:32:28 -06:00
comparison, then by globbing, then by full-string regex matching.
This should still be considered a less than secure option, due to the fact
that trust is based on just the requesting minion id.
2012-08-24 16:20:19 +01:00
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2020-02-26 00:57:58 +03:00
For security reasons the file must be readonly except for its owner.
2017-10-21 01:10:06 +02:00
If :conf_master:`permissive_pki_access` is `` True `` the owning group can also
have write access, but if Salt is running as `` root `` it must be a member of that group.
A less strict requirement also existed in previous version.
2014-02-04 15:46:22 -06:00
.. conf_master :: autoreject_file
2013-11-21 17:12:31 -06:00
`` autoreject_file ``
-------------------
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.1.0
2013-11-21 17:12:31 -06:00
Default: `` not defined ``
Works like :conf_master:`autosign_file` , but instead allows you to specify
minion IDs for which keys will automatically be rejected. Will override both
membership in the :conf_master:`autosign_file` and the
:conf_master:`auto_accept` setting.
2017-10-10 02:36:54 +02:00
.. conf_master :: autosign_grains_dir
`` autosign_grains_dir ``
2017-12-07 16:31:17 +01:00
-----------------------
2017-10-10 02:36:54 +02:00
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-10-18 16:29:07 +02:00
2017-10-10 02:36:54 +02:00
Default: `` not defined ``
If the `` autosign_grains_dir `` is specified, incoming keys from minions with
grain values that match those defined in files in the autosign_grains_dir
will be accepted automatically. Grain values that should be accepted automatically
can be defined by creating a file named like the corresponding grain in the
autosign_grains_dir and writing the values into that file, one value per line.
Lines starting with a `` # `` will be ignored.
Minion must be configured to send the corresponding grains on authentication.
This should still be considered a less than secure option, due to the fact
that trust is based on just the requesting minion.
Please see the :ref: `Autoaccept Minions from Grains <tutorial-autoaccept-grains>`
2018-03-08 19:11:13 +01:00
documentation for more information.
2017-10-10 02:36:54 +02:00
.. code-block :: yaml
autosign_grains_dir: /etc/salt/autosign_grains
2017-07-14 17:26:02 -06:00
.. conf_master :: permissive_pki_access
`` permissive_pki_access ``
-------------------------
Default: `` False ``
Enable permissive access to the salt keys. This allows you to run the
master or minion as root, but have a non-root group be given access to
your pki_dir. To make the access explicit, root must belong to the group
you've given access to. This is potentially quite insecure. If an autosign_file
is specified, enabling permissive_pki_access will allow group access to that
specific file.
.. code-block :: yaml
permissive_pki_access: False
2015-10-22 13:04:49 +03:00
.. conf_master :: publisher_acl
2012-08-18 00:34:40 -06:00
2015-10-22 13:04:49 +03:00
`` publisher_acl ``
-----------------
2012-08-18 00:34:40 -06:00
2013-08-08 15:10:32 -05:00
Default: `` {} ``
2012-08-18 00:34:40 -06:00
Enable user accounts on the master to execute specific modules. These modules
2016-12-19 16:11:19 -07:00
can be expressed as regular expressions.
2012-08-18 00:34:40 -06:00
.. code-block :: yaml
2015-10-22 13:04:49 +03:00
publisher_acl:
2012-08-18 00:34:40 -06:00
fred:
- test.ping
- pkg.*
2015-10-22 13:04:49 +03:00
.. conf_master :: publisher_acl_blacklist
2013-08-08 15:10:32 -05:00
2015-10-22 13:04:49 +03:00
`` publisher_acl_blacklist ``
---------------------------
2013-08-08 15:10:32 -05:00
Default: `` {} ``
Blacklist users or modules
This example would blacklist all non sudo users, including root from
running any commands. It would also blacklist any use of the "cmd"
2016-12-19 16:11:19 -07:00
module.
2013-08-08 15:10:32 -05:00
This is completely disabled by default.
.. code-block :: yaml
2015-10-22 13:04:49 +03:00
publisher_acl_blacklist:
2013-08-08 15:10:32 -05:00
users:
- root
- '^(?!sudo_).*$' # all non sudo users
modules:
2017-05-24 17:22:36 -06:00
- cmd.*
- test.echo
2013-08-08 15:10:32 -05:00
2017-07-14 17:26:02 -06:00
.. conf_master :: sudo_acl
`` sudo_acl ``
------------
Default: `` False ``
Enforce `` publisher_acl `` and `` publisher_acl_blacklist `` when users have sudo
access to the salt command.
.. code-block :: yaml
sudo_acl: False
2013-08-08 15:10:32 -05:00
.. conf_master :: external_auth
`` external_auth ``
-----------------
Default: `` {} ``
The external auth system uses the Salt auth modules to authenticate and
validate users to access areas of the Salt system.
.. code-block :: yaml
external_auth:
pam:
fred:
- test.*
.. conf_master :: token_expire
`` token_expire ``
----------------
Default: `` 43200 ``
2014-10-09 10:14:37 -06:00
Time (in seconds) for a newly generated token to live.
Default: 12 hours
2013-08-08 15:10:32 -05:00
.. code-block :: yaml
token_expire: 43200
2016-05-16 23:05:27 -06:00
.. conf_master :: token_expire_user_override
2016-05-17 15:27:53 -06:00
`` token_expire_user_override ``
------------------------------
2016-05-16 23:05:27 -06:00
Default: `` False ``
Allow eauth users to specify the expiry time of the tokens they generate.
2016-05-17 15:27:53 -06:00
A boolean applies to all users or a dictionary of whitelisted eauth backends
and usernames may be given:
.. code-block :: yaml
token_expire_user_override:
pam:
- fred
- tom
ldap:
- gary
2017-03-16 20:32:10 +03:00
.. conf_master :: keep_acl_in_token
`` keep_acl_in_token ``
---------------------
Default: `` False ``
Set to True to enable keeping the calculated user's auth list in the token
file. This is disabled by default and the auth list is calculated or requested
from the eauth driver each time.
2022-12-08 23:00:47 +01:00
Note: `keep_acl_in_token` will be forced to True when using external authentication
for REST API (`rest` is present under `external_auth` ). This is because the REST API
does not store the password, and can therefore not retroactively fetch the ACL, so
the ACL must be stored in the token.
2017-03-16 20:32:10 +03:00
.. code-block :: yaml
keep_acl_in_token: False
2017-03-17 18:05:02 +03:00
.. conf_master :: eauth_acl_module
`` eauth_acl_module ``
2017-06-14 15:15:46 -06:00
--------------------
2017-03-17 18:05:02 +03:00
Default: `` '' ``
Auth subsystem module to use to get authorized access list for a user. By default it's
the same module used for external authentication.
.. code-block :: yaml
eauth_acl_module: django
2013-08-08 15:10:32 -05:00
.. conf_master :: file_recv
`` file_recv ``
-------------
Default: `` False ``
Allow minions to push files to the master. This is disabled by default, for
security purposes.
.. code-block :: yaml
2014-07-15 12:09:52 +02:00
file_recv: False
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. conf_master :: file_recv_max_size
`` file_recv_max_size ``
----------------------
.. versionadded :: 2014.7.0
Default: `` 100 ``
Set a hard-limit on the size of the files that can be pushed to the master.
It will be interpreted as megabytes.
.. code-block :: yaml
file_recv_max_size: 100
2014-07-15 12:09:52 +02:00
.. conf_master :: master_sign_pubkey
`` master_sign_pubkey ``
----------------------
Default: `` False ``
2016-03-31 13:50:51 -06:00
Sign the master auth-replies with a cryptographic signature of the master's
2014-07-15 12:09:52 +02:00
public key. Please see the tutorial how to use these settings in the
2021-09-09 15:55:18 +00:00
`Multimaster-PKI with Failover Tutorial <https://docs.saltproject.io/en/latest/topics/tutorials/multimaster_pki.html> `_
2014-07-15 12:09:52 +02:00
.. code-block :: yaml
master_sign_pubkey: True
.. conf_master :: master_sign_key_name
`` master_sign_key_name ``
2014-08-11 10:20:15 -04:00
------------------------
2014-07-15 12:09:52 +02:00
Default: `` master_sign ``
The customizable name of the signing-key-pair without suffix.
.. code-block :: yaml
master_sign_key_name: <filename_without_suffix>
.. conf_master :: master_pubkey_signature
`` master_pubkey_signature ``
---------------------------
Default: `` master_pubkey_signature ``
2016-03-31 13:50:51 -06:00
The name of the file in the master's pki-directory that holds the pre-calculated
signature of the master's public-key.
2014-07-15 12:09:52 +02:00
.. code-block :: yaml
master_pubkey_signature: <filename>
.. conf_master :: master_use_pubkey_signature
`` master_use_pubkey_signature ``
-------------------------------
Default: `` False ``
Instead of computing the signature for each auth-reply, use a pre-calculated
signature. The :conf_master:`master_pubkey_signature` must also be set for this.
.. code-block :: yaml
master_use_pubkey_signature: True
2013-08-08 15:10:32 -05:00
2014-09-18 13:57:38 +02:00
.. conf_master :: rotate_aes_key
`` rotate_aes_key ``
------------------
Default: `` True ``
Rotate the salt-masters AES-key when a minion-public is deleted with salt-key.
This is a very important security-setting. Disabling it will enable deleted
minions to still listen in on the messages published by the salt-master.
Do not disable this unless it is absolutely clear what this does.
.. code-block :: yaml
rotate_aes_key: True
2017-07-14 17:26:02 -06:00
.. conf_master :: publish_session
`` publish_session ``
-------------------
Default: `` 86400 ``
The number of seconds between AES key rotations on the master.
.. code-block :: yaml
publish_session: Default: 86400
2014-09-18 13:57:38 +02:00
2016-11-21 17:19:50 +03:00
.. conf_master :: ssl
`` ssl ``
-------
.. versionadded :: 2016.11.0
Default: `` None ``
TLS/SSL connection options. This could be set to a dictionary containing
arguments corresponding to python `` ssl.wrap_socket `` method. For details see
`Tornado <http://www.tornadoweb.org/en/stable/tcpserver.html#tornado.tcpserver.TCPServer> `_
2021-01-13 12:55:50 -06:00
and `Python <https://docs.python.org/3/library/ssl.html#ssl.wrap_socket> `_
2016-11-21 17:19:50 +03:00
documentation.
Note: to set enum arguments values like `` cert_reqs `` and `` ssl_version `` use
constant names without ssl module prefix: `` CERT_REQUIRED `` or `` PROTOCOL_SSLv23 `` .
.. code-block :: yaml
ssl:
keyfile: <path_to_keyfile>
certfile: <path_to_certfile>
ssl_version: PROTOCOL_TLSv1_2
2018-05-28 16:13:12 -05:00
.. conf_master :: preserve_minion_cache
2017-04-17 13:20:45 -06:00
2018-05-28 16:13:12 -05:00
`` preserve_minion_cache ``
-------------------------
2017-04-17 13:20:45 -06:00
2017-07-14 17:26:02 -06:00
Default: `` False ``
By default, the master deletes its cache of minion data when the key for that
minion is removed. To preserve the cache after key deletion, set
`` preserve_minion_cache `` to True.
WARNING: This may have security implications if compromised minions auth with
a previous deleted minion ID.
.. code-block :: yaml
preserve_minion_cache: False
.. conf_master :: allow_minion_key_revoke
`` allow_minion_key_revoke ``
---------------------------
2017-04-17 13:20:45 -06:00
Default: `` True ``
Controls whether a minion can request its own key revocation. When True
the master will honor the minion's request and revoke its key. When False,
the master will drop the request and the minion's key will remain accepted.
.. code-block :: yaml
2018-05-28 16:13:12 -05:00
allow_minion_key_revoke: False
2016-11-21 17:19:50 +03:00
2018-07-17 16:37:42 -05:00
.. conf_master :: optimization_order
`` optimization_order ``
----------------------
Default: `` [0, 1, 2] ``
In cases where Salt is distributed without .py files, this option determines
the priority of optimization level(s) Salt's module loader should prefer.
2018-07-17 18:50:11 -05:00
.. note ::
This option is only supported on Python 3.5+.
2018-07-17 16:37:42 -05:00
.. code-block :: yaml
optimization_order:
- 2
- 0
- 1
2017-06-14 15:15:46 -06:00
2017-07-14 17:26:02 -06:00
Master Large Scale Tuning Settings
==================================
.. conf_master :: max_open_files
`` max_open_files ``
------------------
Default: `` 100000 ``
Each minion connecting to the master uses AT LEAST one file descriptor, the
master subscription connection. If enough minions connect you might start
seeing on the console(and then salt-master crashes):
2020-10-08 10:54:41 +01:00
.. code-block :: text
2017-07-14 17:26:02 -06:00
Too many open files (tcp_listener.cpp:335)
Aborted (core dumped)
.. code-block :: yaml
max_open_files: 100000
By default this value will be the one of `ulimit -Hn` , i.e., the hard limit for
max open files.
To set a different value than the default one, uncomment, and configure this
setting. Remember that this value CANNOT be higher than the hard limit. Raising
the hard limit depends on the OS and/or distribution, a good way to find the
limit is to search the internet for something like this:
.. code-block :: text
raise max open files hard limit debian
.. conf_master :: worker_threads
`` worker_threads ``
------------------
Default: `` 5 ``
The number of threads to start for receiving commands and replies from minions.
If minions are stalling on replies because you have many minions, raise the
worker_threads value.
Worker threads should not be put below 3 when using the peer system, but can
drop down to 1 worker otherwise.
2023-01-26 14:53:43 +00:00
Standards for busy environments:
* Use one worker thread per 200 minions.
* The value of worker_threads should not exceed 1½ times the available CPU cores.
2017-07-14 17:26:02 -06:00
.. note ::
When the master daemon starts, it is expected behaviour to see
multiple salt-master processes, even if 'worker_threads' is set to '1'. At
a minimum, a controlling process will start along with a Publisher, an
EventPublisher, and a number of MWorker processes will be started. The
number of MWorker processes is tuneable by the 'worker_threads'
configuration value while the others are not.
.. code-block :: yaml
worker_threads: 5
.. conf_master :: pub_hwm
`` pub_hwm ``
-----------
Default: `` 1000 ``
The zeromq high water mark on the publisher interface.
.. code-block :: yaml
pub_hwm: 1000
.. conf_master :: zmq_backlog
`` zmq_backlog ``
---------------
Default: `` 1000 ``
The listen queue size of the ZeroMQ backlog.
.. code-block :: yaml
zmq_backlog: 1000
2017-06-14 15:15:46 -06:00
.. _master-module-management:
2012-05-18 18:39:22 -06:00
Master Module Management
2013-08-07 23:50:51 +01:00
========================
2012-05-18 18:39:22 -06:00
.. conf_master :: runner_dirs
`` runner_dirs ``
---------------
Default: `` [] ``
2014-10-09 10:14:37 -06:00
Set additional directories to search for runner modules.
2012-05-18 18:39:22 -06:00
2016-03-31 13:50:51 -06:00
.. code-block :: yaml
runner_dirs:
- /var/lib/salt/runners
2017-08-23 11:28:02 +03:00
.. conf_master :: utils_dirs
`` utils_dirs ``
---------------
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-08-23 11:28:02 +03:00
Default: `` [] ``
Set additional directories to search for util modules.
.. code-block :: yaml
utils_dirs:
- /var/lib/salt/utils
2012-05-21 14:36:34 -06:00
.. conf_master :: cython_enable
`` cython_enable ``
-----------------
Default: `` False ``
2014-04-30 14:08:31 -07:00
Set to true to enable Cython modules (.pyx files) to be compiled on the fly on
2014-10-09 10:14:37 -06:00
the Salt master.
2012-05-21 14:36:34 -06:00
.. code-block :: yaml
cython_enable: False
2014-01-12 05:23:09 +00:00
2017-06-14 15:15:46 -06:00
.. _master-state-system-settings:
2011-05-30 22:16:25 -06:00
Master State System Settings
2013-08-07 23:50:51 +01:00
============================
2011-05-30 22:16:25 -06:00
.. conf_master :: state_top
`` state_top ``
-------------
2012-01-13 12:35:56 -07:00
Default: `` top.sls ``
2011-05-30 22:16:25 -06:00
The state system uses a "top" file to tell the minions what environment to
use and what modules to use. The state_top file is defined relative to the
2017-07-19 11:29:18 +02:00
root of the base environment. The value of "state_top" is also used for the
pillar top file
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
2012-01-13 12:35:56 -07:00
state_top: top.sls
2011-05-30 22:16:25 -06:00
2017-01-23 20:38:03 -06:00
.. conf_master :: state_top_saltenv
`` state_top_saltenv ``
---------------------
This option has no default value. Set it to an environment name to ensure that
*only* the top file from that environment is considered during a
:ref: `highstate <running-highstate>` .
.. note ::
Using this value does not change the merging strategy. For instance, if
:conf_master:`top_file_merging_strategy` is set to `` merge `` , and
:conf_master:`state_top_saltenv` is set to `` foo `` , then any sections for
environments other than `` foo `` in the top file for the `` foo `` environment
will be ignored. With :conf_master:`state_top_saltenv` set to `` base `` , all
states from all environments in the `` base `` top file will be applied,
while all other top files are ignored. The only way to set
:conf_master:`state_top_saltenv` to something other than `` base `` and not
have the other environments in the targeted top file ignored, would be to
set :conf_master:`top_file_merging_strategy` to `` merge_all `` .
.. code-block :: yaml
state_top_saltenv: dev
.. conf_master :: top_file_merging_strategy
`` top_file_merging_strategy ``
-----------------------------
.. versionchanged :: 2016.11.0
A `` merge_all `` strategy has been added.
Default: `` merge ``
When no specific fileserver environment (a.k.a. `` saltenv `` ) has been specified
for a :ref: `highstate <running-highstate>` , all environments' top files are
inspected. This config option determines how the SLS targets in those top files
are handled.
When set to `` merge `` , the `` base `` environment's top file is evaluated first,
followed by the other environments' top files. The first target expression
(e.g. `` '*' `` ) for a given environment is kept, and when the same target
expression is used in a different top file evaluated later, it is ignored.
Because `` base `` is evaluated first, it is authoritative. For example, if there
is a target for `` '*' `` for the `` foo `` environment in both the `` base `` and
`` foo `` environment's top files, the one in the `` foo `` environment would be
ignored. The environments will be evaluated in no specific order (aside from
`` base `` coming first). For greater control over the order in which the
environments are evaluated, use :conf_master:`env_order` . Note that, aside from
the `` base `` environment's top file, any sections in top files that do not
match that top file's environment will be ignored. So, for example, a section
for the `` qa `` environment would be ignored if it appears in the `` dev ``
environment's top file. To keep use cases like this from being ignored, use the
`` merge_all `` strategy.
When set to `` same `` , then for each environment, only that environment's top
file is processed, with the others being ignored. For example, only the `` dev ``
environment's top file will be processed for the `` dev `` environment, and any
SLS targets defined for `` dev `` in the `` base `` environment's (or any other
environment's) top file will be ignored. If an environment does not have a top
file, then the top file from the :conf_master:`default_top` config parameter
will be used as a fallback.
When set to `` merge_all `` , then all states in all environments in all top files
will be applied. The order in which individual SLS files will be executed will
depend on the order in which the top files were evaluated, and the environments
will be evaluated in no specific order. For greater control over the order in
which the environments are evaluated, use :conf_master:`env_order` .
.. code-block :: yaml
top_file_merging_strategy: same
.. conf_master :: env_order
`` env_order ``
-------------
Default: `` [] ``
When :conf_master:`top_file_merging_strategy` is set to `` merge `` , and no
environment is specified for a :ref: `highstate <running-highstate>` , this
config option allows for the order in which top files are evaluated to be
explicitly defined.
.. code-block :: yaml
env_order:
- base
- dev
- qa
2014-01-12 05:23:09 +00:00
.. conf_master :: master_tops
`` master_tops ``
---------------
Default: `` {} ``
The master_tops option replaces the external_nodes option by creating
2014-04-30 14:08:31 -07:00
a pluggable system for the generation of external top data. The external_nodes
2014-01-12 05:23:09 +00:00
option is deprecated by the master_tops option.
To gain the capabilities of the classic external_nodes system, use the
following configuration:
2014-01-12 05:33:04 +00:00
.. code-block :: yaml
master_tops:
ext_nodes: <Shell command which returns yaml>
2014-01-12 05:23:09 +00:00
2011-05-30 22:16:25 -06:00
.. conf_master :: renderer
`` renderer ``
------------
2018-04-16 22:28:34 -05:00
Default: `` jinja|yaml ``
2011-05-30 22:16:25 -06:00
2014-10-09 10:14:37 -06:00
The renderer to use on the minions to render the state data.
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
2018-04-16 22:28:34 -05:00
renderer: jinja|json
2011-05-30 22:16:25 -06:00
2017-03-31 11:13:44 -05:00
.. conf_master :: userdata_template
2017-03-31 10:23:44 -05:00
2017-03-31 11:13:44 -05:00
`` userdata_template ``
2017-03-31 10:23:44 -05:00
---------------------
.. versionadded :: 2016.11.4
2017-03-31 11:13:44 -05:00
Default: `` None ``
2017-03-31 10:23:44 -05:00
The renderer to use for templating userdata files in salt-cloud, if the
2017-03-31 11:13:44 -05:00
`` userdata_template `` is not set in the cloud profile. If no value is set in
the cloud profile or master config file, no templating will be performed.
2017-03-31 10:23:44 -05:00
.. code-block :: yaml
2017-03-31 11:13:44 -05:00
userdata_template: jinja
2017-03-31 10:23:44 -05:00
2017-10-01 14:23:41 -04:00
.. conf_master :: jinja_env
2017-08-10 22:49:58 -04:00
2017-10-01 14:23:41 -04:00
`` jinja_env ``
-------------
2017-08-10 22:49:58 -04:00
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-08-10 22:49:58 -04:00
2017-10-01 14:23:41 -04:00
Default: `` {} ``
2017-08-10 22:49:58 -04:00
2017-10-01 15:47:03 -04:00
jinja_env overrides the default Jinja environment options for
**all templates except sls templates** .
To set the options for sls templates use :conf_master:`jinja_sls_env` .
2016-05-17 10:58:20 -06:00
2017-10-01 14:23:41 -04:00
.. note ::
2017-08-10 22:49:58 -04:00
2020-05-04 03:28:38 -05:00
The `Jinja2 Environment documentation <https://jinja.palletsprojects.com/en/2.11.x/api/#jinja2.Environment> `_ is the official source for the default values.
2017-10-01 15:47:03 -04:00
Not all the options listed in the jinja documentation can be overridden using :conf_master:`jinja_env` or :conf_master:`jinja_sls_env` .
2017-08-10 22:49:58 -04:00
2017-10-01 14:23:41 -04:00
The default options are:
2017-08-10 22:49:58 -04:00
.. code-block :: yaml
2017-10-01 14:23:41 -04:00
jinja_env:
block_start_string: '{%'
block_end_string: '%}'
variable_start_string: '{{'
variable_end_string: '}}'
comment_start_string: '{#'
comment_end_string: '#}'
2017-12-05 00:06:54 -06:00
line_statement_prefix:
line_comment_prefix:
2017-10-01 14:23:41 -04:00
trim_blocks: False
lstrip_blocks: False
newline_sequence: '\n'
keep_trailing_newline: False
2017-08-10 22:49:58 -04:00
2017-10-01 15:47:03 -04:00
.. conf_master :: jinja_sls_env
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
`` jinja_sls_env ``
-----------------
2017-05-23 16:46:30 +02:00
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
Default: `` {} ``
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
jinja_sls_env sets the Jinja environment options for **sls templates** .
The defaults and accepted options are exactly the same as they are
for :conf_master:`jinja_env` .
The default options are:
2017-05-23 16:46:30 +02:00
.. code-block :: yaml
2017-10-01 15:47:03 -04:00
jinja_sls_env:
block_start_string: '{%'
block_end_string: '%}'
variable_start_string: '{{'
variable_end_string: '}}'
comment_start_string: '{#'
comment_end_string: '#}'
2017-12-05 00:06:54 -06:00
line_statement_prefix:
line_comment_prefix:
2017-10-01 15:47:03 -04:00
trim_blocks: False
lstrip_blocks: False
newline_sequence: '\n'
keep_trailing_newline: False
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
Example using line statements and line comments to increase ease of use:
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
If your configuration options are
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
.. code-block :: yaml
2018-06-06 00:49:37 -05:00
2017-10-01 15:47:03 -04:00
jinja_sls_env:
line_statement_prefix: '%'
line_comment_prefix: '##'
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
With these options jinja will interpret anything after a `` % `` at the start of a line (ignoreing whitespace)
as a jinja statement and will interpret anything after a `` ## `` as a comment.
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
This allows the following more convenient syntax to be used:
2017-05-23 16:46:30 +02:00
2018-06-06 00:49:37 -05:00
.. code-block :: jinja
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
## (this comment will not stay once rendered)
# (this comment remains in the rendered template)
## ensure all the formula services are running
2017-05-23 16:46:30 +02:00
% for service in formula_services:
2018-03-08 19:11:13 +01:00
enable_service_{{ service }}:
2017-05-23 16:46:30 +02:00
service.running:
name: {{ service }}
% endfor
2017-10-01 16:59:28 -04:00
The following less convenient but equivalent syntax would have to
2017-10-01 15:47:03 -04:00
be used if you had not set the line_statement and line_comment options:
2017-05-23 16:46:30 +02:00
2018-06-06 00:49:37 -05:00
.. code-block :: jinja
2017-05-23 16:46:30 +02:00
2017-10-01 15:47:03 -04:00
{# (this comment will not stay once rendered) #}
# (this comment remains in the rendered template)
{# ensure all the formula services are running #}
{% for service in formula_services %}
enable_service_{{ service }}:
service.running:
name: {{ service }}
{% endfor %}
2017-05-23 16:46:30 +02:00
2016-05-17 10:58:20 -06:00
.. conf_master :: jinja_trim_blocks
`` jinja_trim_blocks ``
---------------------
2018-02-21 21:47:41 -06:00
.. deprecated :: 2018.3.0
2017-10-01 14:23:41 -04:00
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
2016-05-17 10:58:20 -06:00
.. versionadded :: 2014.1.0
Default: `` False ``
If this is set to `` True `` , the first newline after a Jinja block is
removed (block, not variable tag!). Defaults to `` False `` and corresponds
to the Jinja environment init variable `` trim_blocks `` .
.. code-block :: yaml
jinja_trim_blocks: False
.. conf_master :: jinja_lstrip_blocks
`` jinja_lstrip_blocks ``
-----------------------
2018-02-21 21:47:41 -06:00
.. deprecated :: 2018.3.0
2017-10-01 14:23:41 -04:00
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
2016-05-17 10:58:20 -06:00
.. versionadded :: 2014.1.0
Default: `` False ``
If this is set to `` True `` , leading spaces and tabs are stripped from the
start of a line to a block. Defaults to `` False `` and corresponds to the
Jinja environment init variable `` lstrip_blocks `` .
.. code-block :: yaml
jinja_lstrip_blocks: False
2012-01-13 12:35:56 -07:00
.. conf_master :: failhard
2012-04-27 13:13:42 -06:00
`` failhard ``
------------
2013-11-09 13:54:39 -06:00
Default: `` False ``
2012-01-13 12:35:56 -07:00
2016-03-31 13:50:51 -06:00
Set the global failhard flag. This informs all states to stop running states
2014-10-09 10:14:37 -06:00
at the moment a single state fails.
2012-01-13 12:35:56 -07:00
.. code-block :: yaml
failhard: False
2014-01-12 05:23:09 +00:00
.. conf_master :: state_verbose
`` state_verbose ``
-----------------
2014-03-02 09:56:14 -06:00
Default: `` True ``
2014-01-12 05:23:09 +00:00
2014-03-02 09:56:14 -06:00
Controls the verbosity of state runs. By default, the results of all states are
returned, but setting this value to `` False `` will cause salt to only display
2016-03-31 13:50:51 -06:00
output for states that failed or states that have changes.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2014-03-02 09:56:14 -06:00
state_verbose: False
2014-01-12 05:23:09 +00:00
.. conf_master :: state_output
`` state_output ``
----------------
Default: `` full ``
2017-09-14 13:58:39 +02:00
The state_output setting controls which results will be output full multi line:
* `` full `` , `` terse `` - each state will be full/terse
* `` mixed `` - only states with errors will be full
* `` changes `` - states with changes and errors will be full
`` full_id `` , `` mixed_id `` , `` changes_id `` and `` terse_id `` are also allowed;
when set, the state ID will be used as name in the output.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
state_output: full
2017-06-15 16:21:47 -06:00
.. conf_master :: state_output_diff
`` state_output_diff ``
---------------------
Default: `` False ``
The state_output_diff setting changes whether or not the output from
successful states is returned. Useful when even the terse output of these
states is cluttering the logs. Set it to True to ignore them.
.. code-block :: yaml
state_output_diff: False
2020-12-17 21:45:36 -06:00
.. conf_master :: state_output_profile
`` state_output_profile ``
------------------------
Default: `` True ``
The `` state_output_profile `` setting changes whether profile information
will be shown for each state run.
.. code-block :: yaml
state_output_profile: True
2021-10-02 10:01:55 -04:00
.. conf_master :: state_output_pct
`` state_output_pct ``
2022-01-30 14:48:41 -05:00
--------------------
2021-10-02 10:01:55 -04:00
Default: `` False ``
The `` state_output_pct `` setting changes whether success and failure information
as a percent of total actions will be shown for each state run.
.. code-block :: yaml
state_output_pct: False
2022-01-30 14:48:41 -05:00
.. conf_master :: state_compress_ids
`` state_compress_ids ``
----------------------
Default: `` False ``
The `` state_compress_ids `` setting aggregates information about states which
have multiple "names" under the same state ID in the highstate output.
.. code-block :: yaml
state_compress_ids: False
2015-07-30 14:39:15 -06:00
.. conf_master :: state_aggregate
`` state_aggregate ``
-------------------
Default: `` False ``
2020-12-17 21:36:59 -06:00
Automatically aggregate all states that have support for `` mod_aggregate `` by
setting to `` True `` .
2015-07-30 14:39:15 -06:00
.. code-block :: yaml
2020-12-17 21:36:59 -06:00
state_aggregate: True
Or pass a list of state module names to automatically
aggregate just those types.
2015-07-30 14:39:15 -06:00
.. code-block :: yaml
2020-12-17 21:36:59 -06:00
state_aggregate:
- pkg
2015-07-30 14:39:15 -06:00
.. conf_master :: state_events
`` state_events ``
----------------
Default: `` False ``
Send progress events as each function in a state run completes execution
by setting to `` True `` . Progress events are in the format
2015-07-30 15:43:21 -06:00
`` salt/job/<JID>/prog/<MID>/<RUN NUM> `` .
2015-07-30 14:39:15 -06:00
.. code-block :: yaml
state_events: True
2014-07-15 12:09:52 +02:00
.. conf_master :: yaml_utf8
2013-12-13 14:40:47 -07:00
2013-12-13 22:52:02 -07:00
`` yaml_utf8 ``
-------------
2013-12-13 14:40:47 -07:00
Default: `` False ``
2014-10-09 10:14:37 -06:00
Enable extra routines for YAML renderer used states containing UTF characters.
2013-12-13 14:40:47 -07:00
.. code-block :: yaml
yaml_utf8: False
2016-08-01 23:04:05 -05:00
`` runner_returns ``
------------------
2021-09-29 18:27:31 +08:00
Default: `` True ``
2016-08-01 23:04:05 -05:00
2021-09-29 18:27:31 +08:00
If set to `` False `` , runner jobs will not be saved to job cache (defined by
2016-08-01 23:04:05 -05:00
:conf_master:`master_job_cache` ).
.. code-block :: yaml
2021-09-29 18:27:31 +08:00
runner_returns: False
2016-08-01 23:04:05 -05:00
2017-06-14 15:15:46 -06:00
.. _master-file-server-settings:
2011-05-30 22:16:25 -06:00
Master File Server Settings
2013-08-07 23:50:51 +01:00
===========================
2011-05-30 22:16:25 -06:00
2014-02-18 20:40:48 -06:00
.. conf_master :: fileserver_backend
2011-05-30 22:16:25 -06:00
2014-02-18 20:40:48 -06:00
`` fileserver_backend ``
----------------------
2011-05-30 22:16:25 -06:00
2014-09-02 14:35:03 -05:00
Default: `` ['roots'] ``
2011-05-30 22:16:25 -06:00
2014-02-18 20:40:48 -06:00
Salt supports a modular fileserver backend system, this system allows the salt
master to link directly to third party systems to gather and manage the files
available to minions. Multiple backends can be configured and will be searched
for the requested file in the order in which they are defined here. The default
setting only enables the standard backend `` roots `` , which is configured using
the :conf_master:`file_roots` option.
2012-05-22 22:43:12 -06:00
2011-05-30 22:16:25 -06:00
Example:
2011-06-24 22:38:27 -06:00
.. code-block :: yaml
2014-02-18 20:40:48 -06:00
fileserver_backend:
- roots
2017-12-05 00:06:54 -06:00
- gitfs
2011-05-30 22:16:25 -06:00
2016-07-08 16:15:27 -05:00
.. note ::
For masterless Salt, this parameter must be specified in the minion config
file.
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
.. conf_master :: fileserver_followsymlinks
`` fileserver_followsymlinks ``
-----------------------------
.. versionadded :: 2014.1.0
Default: `` True ``
By default, the file_server follows symlinks when walking the filesystem tree.
Currently this only applies to the default roots fileserver_backend.
.. code-block :: yaml
fileserver_followsymlinks: True
.. conf_master :: fileserver_ignoresymlinks
`` fileserver_ignoresymlinks ``
-----------------------------
.. versionadded :: 2014.1.0
Default: `` False ``
If you do not want symlinks to be treated as the files they are pointing to,
set `` fileserver_ignoresymlinks `` to `` True `` . By default this is set to
False. When set to `` True `` , any detected symlink while listing files on the
Master will not be returned to the Minion.
.. code-block :: yaml
fileserver_ignoresymlinks: False
2016-09-11 21:12:57 -05:00
.. conf_master :: fileserver_list_cache_time
`` fileserver_list_cache_time ``
------------------------------
.. versionadded :: 2014.1.0
2016-10-27 15:26:30 -06:00
.. versionchanged :: 2016.11.0
2016-09-11 21:12:57 -05:00
The default was changed from `` 30 `` seconds to `` 20 `` .
Default: `` 20 ``
Salt caches the list of files/symlinks/directories for each fileserver backend
and environment as they are requested, to guard against a performance
bottleneck at scale when many minions all ask the fileserver which files are
available simultaneously. This configuration parameter allows for the max age
of that cache to be altered.
Set this value to `` 0 `` to disable use of this cache altogether, but keep in
mind that this may increase the CPU load on the master when running a highstate
on a large number of minions.
.. note ::
Rather than altering this configuration parameter, it may be advisable to
2018-01-30 14:24:47 +03:00
use the :mod:`fileserver.clear_file_list_cache
<salt.runners.fileserver.clear_file_list_cache>` runner to clear these
caches.
2016-09-11 21:12:57 -05:00
.. code-block :: yaml
fileserver_list_cache_time: 5
2017-02-27 20:21:53 -06:00
.. conf_master :: fileserver_verify_config
`` fileserver_verify_config ``
2017-06-14 11:36:06 -06:00
----------------------------
2017-02-27 20:21:53 -06:00
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-27 20:21:53 -06:00
Default: `` True ``
By default, as the master starts it performs some sanity checks on the
configured fileserver backends. If any of these sanity checks fail (such as
when an invalid configuration is used), the master daemon will abort.
To skip these sanity checks, set this option to `` False `` .
.. code-block :: yaml
fileserver_verify_config: False
2011-05-30 22:16:25 -06:00
.. conf_master :: hash_type
`` hash_type ``
-------------
2016-12-02 09:28:50 -07:00
Default: `` sha256 ``
2011-05-30 22:16:25 -06:00
The hash_type is the hash to use when discovering the hash of a file on
2016-12-02 09:28:50 -07:00
the master server. The default is sha256, but md5, sha1, sha224, sha384, and
2014-12-12 11:34:34 -08:00
sha512 are also supported.
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
2016-12-02 09:28:50 -07:00
hash_type: sha256
2011-05-30 22:16:25 -06:00
.. conf_master :: file_buffer_size
`` file_buffer_size ``
--------------------
Default: `` 1048576 ``
2014-10-09 10:14:37 -06:00
The buffer size in the file server in bytes.
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
file_buffer_size: 1048576
2014-01-12 05:23:09 +00:00
.. conf_master :: file_ignore_regex
`` file_ignore_regex ``
---------------------
Default: `` '' ``
A regular expression (or a list of expressions) that will be matched
against the file path before syncing the modules and states to the minions.
This includes files affected by the file.recurse state.
For example, if you manage your custom modules and states in subversion
and don't want all the '.svn' folders and content synced to your minions,
you could set this to '/\.svn($|/)'. By default nothing is ignored.
.. code-block :: yaml
file_ignore_regex:
- '/\.svn($|/)'
- '/\.git($|/)'
2014-01-12 05:33:04 +00:00
.. conf_master :: file_ignore_glob
2014-01-12 05:23:09 +00:00
`` file_ignore_glob ``
--------------------
Default `` '' ``
A file glob (or list of file globs) that will be matched against the file
path before syncing the modules and states to the minions. This is similar
to file_ignore_regex above, but works on globs instead of regex. By default
nothing is ignored.
.. code-block :: yaml
2014-07-15 12:09:52 +02:00
2014-01-12 05:23:09 +00:00
file_ignore_glob:
- '\*.pyc'
- '\*/somefolder/\*.bak'
- '\*.swp'
2015-08-11 15:16:44 -05:00
.. note ::
Vim's .swp files are a common cause of Unicode errors in
:py:func: `file.recurse <salt.states.file.recurse>` states which use
templating. Unless there is a good reason to distribute them via the
fileserver, it is good practice to include `` '\*.swp' `` in the
:conf_master:`file_ignore_glob` .
2017-12-05 00:06:54 -06:00
.. conf_master :: master_roots
`` master_roots ``
----------------
2020-02-05 16:44:00 +00:00
Default: `` '' ``
2017-12-05 00:06:54 -06:00
A master-only copy of the :conf_master:`file_roots` dictionary, used by the
state compiler.
2020-02-05 16:44:00 +00:00
Example:
2017-12-05 00:06:54 -06:00
.. code-block :: yaml
2020-02-05 16:44:00 +00:00
master_roots:
base:
- /srv/salt-master
2015-08-11 15:16:44 -05:00
2014-02-18 20:40:48 -06:00
roots: Master's Local File Server
---------------------------------
2014-01-12 05:23:09 +00:00
2014-02-18 20:40:48 -06:00
.. conf_master :: file_roots
`` file_roots ``
***** ***** *** *
2014-01-12 05:23:09 +00:00
2022-01-27 08:05:13 -05:00
.. versionchanged :: 3005
2014-01-12 05:23:09 +00:00
Default:
.. code-block :: yaml
2014-02-18 20:40:48 -06:00
base:
- /srv/salt
2014-01-12 05:23:09 +00:00
2014-02-18 20:40:48 -06:00
Salt runs a lightweight file server written in ZeroMQ to deliver files to
minions. This file server is built into the master daemon and does not
require a dedicated port.
2014-01-12 05:23:09 +00:00
2014-02-18 20:40:48 -06:00
The file server works on environments passed to the master. Each environment
can have multiple root directories. The subdirectories in the multiple file
roots cannot match, otherwise the downloaded files will not be able to be
reliably ensured. A base environment is required to house the top file.
2014-10-09 10:14:37 -06:00
2018-12-07 07:13:20 +01:00
As of 2018.3.5 and 2019.2.1, it is possible to have `__env__` as a catch-all environment.
2014-01-12 05:23:09 +00:00
Example:
.. code-block :: yaml
2014-02-18 20:40:48 -06:00
file_roots:
base:
- /srv/salt
dev:
- /srv/salt/dev/services
- /srv/salt/dev/states
prod:
- /srv/salt/prod/services
- /srv/salt/prod/states
2018-12-07 07:13:20 +01:00
__env__:
- /srv/salt/default
2014-01-03 19:22:44 -06:00
2022-01-27 08:05:13 -05:00
Taking dynamic environments one step further, `` __env__ `` can also be used in
the `` file_roots `` filesystem path as of version 3005. It will be replaced with
the actual `` saltenv `` and searched for states and data to provide to the
2022-01-28 22:50:37 -05:00
minion. Note this substitution ONLY occurs for the `` __env__ `` environment. For
instance, this configuration:
2022-01-27 08:05:13 -05:00
.. code-block :: yaml
file_roots:
__env__:
- /srv/__env__/salt
is equivalent to this static configuration:
.. code-block :: yaml
file_roots:
dev:
- /srv/dev/salt
test:
- /srv/test/salt
prod:
- /srv/prod/salt
2016-07-08 16:15:27 -05:00
.. note ::
For masterless Salt, this parameter must be specified in the minion config
file.
2017-12-05 00:06:54 -06:00
.. conf_master :: roots_update_interval
2017-06-15 16:21:47 -06:00
2017-12-05 00:06:54 -06:00
`` roots_update_interval ``
***** ***** ***** ***** *****
2017-06-15 16:21:47 -06:00
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the update interval (in seconds) for
:conf_master:`file_roots` .
2017-06-15 16:21:47 -06:00
2017-12-05 00:06:54 -06:00
.. note ::
Since `` file_roots `` consists of files local to the minion, the update
process for this fileserver backend just reaps the cache for this backend.
2017-06-15 16:21:47 -06:00
.. code-block :: yaml
2017-12-05 00:06:54 -06:00
roots_update_interval: 120
2017-06-15 16:21:47 -06:00
2017-12-05 00:06:54 -06:00
gitfs: Git Remote File Server Backend
-------------------------------------
2014-01-03 19:22:44 -06:00
.. conf_master :: gitfs_remotes
`` gitfs_remotes ``
2014-02-18 20:40:48 -06:00
***** ***** ***** **
2014-01-03 19:22:44 -06:00
Default: `` [] ``
2014-02-08 05:25:07 -06:00
When using the `` git `` fileserver backend at least one git remote needs to be
2014-01-03 19:22:44 -06:00
defined. The user running the salt master will need read access to the repo.
2014-02-08 05:25:07 -06:00
The repos will be searched in order to find the file requested by a client and
the first repo to have the file will return it. Branches and tags are
translated into salt environments.
2014-01-03 19:22:44 -06:00
.. code-block :: yaml
gitfs_remotes:
- git://github.com/saltstack/salt-states.git
- file:///var/git/saltmaster
.. note ::
2014-02-15 01:19:02 -06:00
2014-08-20 18:25:08 -05:00
`` file:// `` repos will be treated as a remote and copied into the master's
gitfs cache, so only the *local* refs for those repos will be exposed as
fileserver environments.
2014-01-03 19:22:44 -06:00
2014-08-20 18:25:08 -05:00
As of 2014.7.0, it is possible to have per-repo versions of several of the
2014-10-19 17:01:13 -05:00
gitfs configuration parameters. For more information, see the :ref:`GitFS
2014-08-20 18:25:08 -05:00
Walkthrough <gitfs-per-remote-config>`.
2014-04-22 05:42:10 -05:00
2014-02-18 20:40:48 -06:00
.. conf_master :: gitfs_provider
`` gitfs_provider ``
***** ***** ***** ***
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-18 20:40:48 -06:00
2015-08-09 02:53:36 -05:00
Optional parameter used to specify the provider to be used for gitfs. More
information can be found in the :ref: `GitFS Walkthrough <gitfs-dependencies>` .
2014-02-18 20:40:48 -06:00
2017-02-09 10:50:45 -06:00
Must be either `` pygit2 `` or `` gitpython `` . If unset, then each will be tried
in that same order, and the first one with a compatible version installed will
be the provider that is used.
2014-02-18 20:40:48 -06:00
.. code-block :: yaml
2017-02-09 10:50:45 -06:00
gitfs_provider: gitpython
2014-02-15 01:19:02 -06:00
2014-01-03 19:22:44 -06:00
.. conf_master :: gitfs_ssl_verify
`` gitfs_ssl_verify ``
2014-02-18 20:40:48 -06:00
***** ***** ***** *****
2014-01-03 19:22:44 -06:00
2014-08-20 18:25:08 -05:00
Default: `` True ``
2014-01-03 19:22:44 -06:00
2017-05-03 13:24:49 -05:00
Specifies whether or not to ignore SSL certificate errors when fetching from
the repositories configured in :conf_master:`gitfs_remotes` . The `` False ``
setting is useful if you're using a git repo that uses a self-signed
certificate. However, keep in mind that setting this to anything other `` True ``
is a considered insecure, and using an SSH-based transport (if available) may
be a better option.
2016-04-06 15:34:02 -06:00
2014-01-03 19:22:44 -06:00
.. code-block :: yaml
2017-05-03 13:24:49 -05:00
gitfs_ssl_verify: False
2017-05-05 17:01:32 -05:00
.. note ::
pygit2 only supports disabling SSL verification in versions 0.23.2 and
newer.
2017-05-03 13:24:49 -05:00
.. versionchanged :: 2015.8.0
This option can now be configured on individual repositories as well. See
:ref: `here <gitfs-per-remote-config>` for more info.
.. versionchanged :: 2016.11.0
The default config value changed from `` False `` to `` True `` .
2014-01-03 19:22:44 -06:00
2014-02-15 00:30:47 -06:00
.. conf_master :: gitfs_mountpoint
`` gitfs_mountpoint ``
2014-02-18 20:40:48 -06:00
***** ***** ***** *****
2014-02-15 00:30:47 -06:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-15 00:30:47 -06:00
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Specifies a path on the salt fileserver which will be prepended to all files
served by gitfs. This option can be used in conjunction with
2017-05-03 13:24:49 -05:00
:conf_master:`gitfs_root` . It can also be configured for an individual
repository, see :ref: `here <gitfs-per-remote-config>` for more info.
2014-02-15 00:30:47 -06:00
.. code-block :: yaml
gitfs_mountpoint: salt://foo/bar
2014-02-15 01:19:02 -06:00
.. note ::
2014-02-18 20:40:48 -06:00
The `` salt:// `` protocol designation can be left off (in other words,
2016-02-18 16:34:14 -06:00
`` foo/bar `` and `` salt://foo/bar `` are equivalent). Assuming a file
`` baz.sh `` in the root of a gitfs remote, and the above example mountpoint,
this file would be served up via `` salt://foo/bar/baz.sh `` .
2014-02-15 01:19:02 -06:00
2014-01-03 19:22:44 -06:00
.. conf_master :: gitfs_root
`` gitfs_root ``
2014-02-18 20:40:48 -06:00
***** ***** *** *
2014-01-03 19:22:44 -06:00
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Relative path to a subdirectory within the repository from which Salt should
begin to serve files. This is useful when there are files in the repository
that should not be available to the Salt fileserver. Can be used in conjunction
with :conf_master:`gitfs_mountpoint` . If used, then from Salt's perspective the
directories above the one specified will be ignored and the relative path will
(for the purposes of gitfs) be considered as the root of the repo.
2014-01-03 19:22:44 -06:00
.. code-block :: yaml
gitfs_root: somefolder/otherfolder
2014-07-15 16:53:29 -06:00
.. versionchanged :: 2014.7.0
2017-05-03 13:24:49 -05:00
This option can now be configured on individual repositories as well. See
:ref: `here <gitfs-per-remote-config>` for more info.
2014-02-15 01:19:02 -06:00
2014-02-08 05:25:07 -06:00
.. conf_master :: gitfs_base
`` gitfs_base ``
2014-02-18 20:40:48 -06:00
***** ***** *** *
2014-02-08 05:25:07 -06:00
Default: `` master ``
Defines which branch/tag should be used as the `` base `` environment.
.. code-block :: yaml
gitfs_base: salt
2014-08-20 18:25:08 -05:00
.. versionchanged :: 2014.7.0
2017-05-03 13:24:49 -05:00
This option can now be configured on individual repositories as well. See
:ref: `here <gitfs-per-remote-config>` for more info.
2014-08-20 18:25:08 -05:00
2016-05-31 15:08:19 -05:00
.. conf_master :: gitfs_saltenv
`` gitfs_saltenv ``
***** ***** ***** **
2016-10-27 15:26:30 -06:00
.. versionadded :: 2016.11.0
2016-05-31 15:08:19 -05:00
Default: `` [] ``
Global settings for :ref:`per-saltenv configuration parameters
<gitfs-per-saltenv-config> `. Though per-saltenv configuration parameters are
typically one-off changes specific to a single gitfs remote, and thus more
often configured on a per-remote basis, this parameter can be used to specify
per-saltenv changes which should apply to all remotes. For example, the below
configuration will map the `` develop `` branch to the `` dev `` saltenv for all
gitfs remotes.
.. code-block :: yaml
gitfs_saltenv:
- dev:
- ref: develop
2017-05-09 10:34:26 -05:00
.. conf_master :: gitfs_disable_saltenv_mapping
`` gitfs_disable_saltenv_mapping ``
***** ***** ***** ***** ***** ***** ***
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-05-09 10:34:26 -05:00
Default: `` False ``
When set to `` True `` , all saltenv mapping logic is disregarded (aside from
which branch/tag is mapped to the `` base `` saltenv). To use any other
environments, they must then be defined using :ref:`per-saltenv configuration
parameters <gitfs-per-saltenv-config>`.
.. code-block :: yaml
gitfs_disable_saltenv_mapping: True
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
.. conf_master :: gitfs_ref_types
`` gitfs_ref_types ``
***** ***** ***** *** *
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-05-09 10:34:26 -05:00
Default: `` ['branch', 'tag', 'sha'] ``
This option defines what types of refs are mapped to fileserver environments
(i.e. saltenvs). It also sets the order of preference when there are
ambiguously-named refs (i.e. when a branch and tag both have the same name).
The below example disables mapping of both tags and SHAs, so that only branches
are mapped as saltenvs:
.. code-block :: yaml
gitfs_ref_types:
- branch
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
.. note ::
`` sha `` is special in that it will not show up when listing saltenvs (e.g.
with the :py:func: `fileserver.envs <salt.runners.fileserver.envs>` runner),
but works within states and with :py:func:`cp.cache_file
<salt.modules.cp.cache_file>` to retrieve a file from a specific git SHA.
2017-05-06 23:04:08 -05:00
.. conf_master :: gitfs_saltenv_whitelist
2014-02-25 22:49:07 -06:00
2017-05-06 23:04:08 -05:00
`` gitfs_saltenv_whitelist ``
***** ***** ***** ***** ***** **
2014-02-25 22:49:07 -06:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` gitfs_env_whitelist `` to `` gitfs_saltenv_whitelist ``
2014-02-25 22:49:07 -06:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
2014-08-20 18:25:08 -05:00
if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
2014-10-19 17:01:13 -05:00
information can be found in the :ref:`GitFS Walkthrough
2014-08-20 18:25:08 -05:00
<gitfs-whitelist-blacklist> `.
2014-02-25 22:49:07 -06:00
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
gitfs_saltenv_whitelist:
2014-02-25 22:49:07 -06:00
- base
- v1.*
- 'mybranch\d+'
2017-05-06 23:04:08 -05:00
.. conf_master :: gitfs_saltenv_blacklist
2014-02-25 22:49:07 -06:00
2017-05-06 23:04:08 -05:00
`` gitfs_saltenv_blacklist ``
***** ***** ***** ***** ***** **
2014-02-25 22:49:07 -06:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` gitfs_env_blacklist `` to `` gitfs_saltenv_blacklist ``
2014-02-25 22:49:07 -06:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
2014-08-20 18:25:08 -05:00
if the repos in :conf_master:`gitfs_remotes` contain many branches/tags. More
2014-10-19 17:01:13 -05:00
information can be found in the :ref:`GitFS Walkthrough
2014-08-20 18:25:08 -05:00
<gitfs-whitelist-blacklist> `.
2014-02-25 22:49:07 -06:00
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
gitfs_saltenv_blacklist:
2014-02-25 22:49:07 -06:00
- base
- v1.*
- 'mybranch\d+'
2016-04-18 08:40:20 -06:00
.. conf_master :: gitfs_global_lock
`` gitfs_global_lock ``
***** ***** ***** ***** *
.. versionadded :: 2015.8.9
Default: `` True ``
When set to `` False `` , if there is an update lock for a gitfs remote and the
pid written to it is not running on the master, the lock file will be
automatically cleared and a new lock will be obtained. When set to `` True `` ,
Salt will simply log a warning when there is an update lock present.
On single-master deployments, disabling this option can help automatically deal
with instances where the master was shutdown/restarted during the middle of a
gitfs update, leaving a update lock in place.
However, on multi-master deployments with the gitfs cachedir shared via
`GlusterFS`__ , nfs, or another network filesystem, it is strongly recommended
not to disable this option as doing so will cause lock files to be removed if
they were created by a different master.
.. code-block :: yaml
# Disable global lock
gitfs_global_lock: False
.. __: http://www.gluster.org/
2017-12-05 00:06:54 -06:00
.. conf_master :: gitfs_update_interval
`` gitfs_update_interval ``
***** ***** ***** ***** *****
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the default update interval (in seconds) for gitfs remotes.
The update interval can also be set for a single repository via a
:ref: `per-remote config option <gitfs-per-remote-config>`
.. code-block :: yaml
gitfs_update_interval: 120
2014-08-20 18:25:08 -05:00
2014-10-19 17:01:13 -05:00
GitFS Authentication Options
2014-08-20 18:25:08 -05:00
***** ***** ***** ***** ***** ***
These parameters only currently apply to the pygit2 gitfs provider. Examples of
2014-10-19 17:01:13 -05:00
how to use these can be found in the :ref:`GitFS Walkthrough
2014-08-20 18:25:08 -05:00
<gitfs-authentication> `.
.. conf_master :: gitfs_user
`` gitfs_user ``
~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` '' ``
Along with :conf_master:`gitfs_password` , is used to authenticate to HTTPS
remotes.
.. code-block :: yaml
gitfs_user: git
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2014-08-20 18:25:08 -05:00
.. conf_master :: gitfs_password
`` gitfs_password ``
~~~~~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` '' ``
Along with :conf_master:`gitfs_user` , is used to authenticate to HTTPS remotes.
This parameter is not required if the repository does not use authentication.
.. code-block :: yaml
gitfs_password: mypassword
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2014-08-20 18:25:08 -05:00
.. conf_master :: gitfs_insecure_auth
`` gitfs_insecure_auth ``
~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` False ``
By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
parameter enables authentication over HTTP. **Enable this at your own risk.**
.. code-block :: yaml
gitfs_insecure_auth: True
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2014-08-20 18:25:08 -05:00
.. conf_master :: gitfs_pubkey
`` gitfs_pubkey ``
~~~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` '' ``
Along with :conf_master:`gitfs_privkey` (and optionally
2017-05-03 13:24:49 -05:00
:conf_master:`gitfs_passphrase` ), is used to authenticate to SSH remotes.
Required for SSH remotes.
2014-08-20 18:25:08 -05:00
.. code-block :: yaml
gitfs_pubkey: /path/to/key.pub
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2014-08-20 18:25:08 -05:00
.. conf_master :: gitfs_privkey
`` gitfs_privkey ``
~~~~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` '' ``
Along with :conf_master:`gitfs_pubkey` (and optionally
2017-05-03 13:24:49 -05:00
:conf_master:`gitfs_passphrase` ), is used to authenticate to SSH remotes.
Required for SSH remotes.
2014-08-20 18:25:08 -05:00
.. code-block :: yaml
gitfs_privkey: /path/to/key
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2014-08-20 18:25:08 -05:00
.. conf_master :: gitfs_passphrase
`` gitfs_passphrase ``
~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2014.7.0
Default: `` '' ``
This parameter is optional, required only when the SSH key being used to
authenticate is protected by a passphrase.
.. code-block :: yaml
gitfs_passphrase: mypassphrase
2017-05-03 13:24:49 -05:00
.. note ::
This is is a global configuration option, see :ref:`here
<gitfs-per-remote-config>` for examples of configuring it for individual
repositories.
2017-02-09 10:50:45 -06:00
.. conf_master :: gitfs_refspecs
`` gitfs_refspecs ``
~~~~~~~~~~~~~~~~~~
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-09 10:50:45 -06:00
Default: `` ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] ``
When fetching from remote repositories, by default Salt will fetch branches and
tags. This parameter can be used to override the default and specify
alternate refspecs to be fetched. More information on how this feature works
can be found in the :ref: `GitFS Walkthrough <gitfs-custom-refspecs>` .
.. code-block :: yaml
gitfs_refspecs:
- '+refs/heads/*:refs/remotes/origin/* '
- '+refs/tags/*:refs/tags/* '
- '+refs/pull/*/head:refs/remotes/origin/pr/* '
- '+refs/pull/*/merge:refs/remotes/origin/merge/* '
2017-12-05 00:06:54 -06:00
hgfs: Mercurial Remote File Server Backend
------------------------------------------
2014-02-18 20:40:48 -06:00
2014-02-08 05:25:07 -06:00
.. conf_master :: hgfs_remotes
`` hgfs_remotes ``
2014-02-18 20:40:48 -06:00
***** ***** ***** *
2014-02-08 05:25:07 -06:00
.. versionadded :: 0.17.0
Default: `` [] ``
When using the `` hg `` fileserver backend at least one mercurial remote needs to
be defined. The user running the salt master will need read access to the repo.
The repos will be searched in order to find the file requested by a client and
the first repo to have the file will return it. Branches and/or bookmarks are
translated into salt environments, as defined by the
:conf_master:`hgfs_branch_method` parameter.
.. code-block :: yaml
hgfs_remotes:
- https://username@bitbucket.org/username/reponame
2014-02-18 20:40:48 -06:00
.. note ::
2014-07-15 16:53:29 -06:00
As of 2014.7.0, it is possible to have per-repo versions of the
2014-04-08 16:13:29 -05:00
:conf_master:`hgfs_root` , :conf_master:`hgfs_mountpoint` ,
:conf_master:`hgfs_base` , and :conf_master:`hgfs_branch_method` parameters.
2014-02-18 20:40:48 -06:00
For example:
.. code-block :: yaml
hgfs_remotes:
- https://username@bitbucket.org/username/repo1
2014-04-08 16:13:29 -05:00
- base: saltstates
2014-02-18 20:40:48 -06:00
- https://username@bitbucket.org/username/repo2:
- root: salt
- mountpoint: salt://foo/bar/baz
- https://username@bitbucket.org/username/repo3:
- root: salt/states
2014-04-08 16:13:29 -05:00
- branch_method: mixed
2014-02-18 20:40:48 -06:00
2014-02-08 05:25:07 -06:00
.. conf_master :: hgfs_branch_method
`` hgfs_branch_method ``
2014-02-18 20:40:48 -06:00
***** ***** ***** ***** **
2014-02-08 05:25:07 -06:00
.. versionadded :: 0.17.0
Default: `` branches ``
Defines the objects that will be used as fileserver environments.
2014-02-08 13:14:43 -06:00
* `` branches `` - Only branches and tags will be used
* `` bookmarks `` - Only bookmarks and tags will be used
* `` mixed `` - Branches, bookmarks, and tags will be used
2014-02-08 05:25:07 -06:00
.. code-block :: yaml
hgfs_branch_method: mixed
.. note ::
2014-07-15 16:53:29 -06:00
Starting in version 2014.1.0, the value of the :conf_master:`hgfs_base`
parameter defines which branch is used as the `` base `` environment,
allowing for a `` base `` environment to be used with an
:conf_master:`hgfs_branch_method` of `` bookmarks `` .
2014-02-08 13:14:43 -06:00
Prior to this release, the `` default `` branch will be used as the `` base ``
environment.
2014-02-08 05:25:07 -06:00
2014-02-18 20:40:48 -06:00
.. conf_master :: hgfs_mountpoint
`` hgfs_mountpoint ``
***** ***** ***** *** *
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-18 20:40:48 -06:00
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Specifies a path on the salt fileserver which will be prepended to all files
served by hgfs. This option can be used in conjunction with
:conf_master:`hgfs_root` . It can also be configured on a per-remote basis, see
:conf_master:`here <hgfs_remotes>` for more info.
2014-02-18 20:40:48 -06:00
.. code-block :: yaml
hgfs_mountpoint: salt://foo/bar
.. note ::
The `` salt:// `` protocol designation can be left off (in other words,
2016-02-18 16:34:14 -06:00
`` foo/bar `` and `` salt://foo/bar `` are equivalent). Assuming a file
`` baz.sh `` in the root of an hgfs remote, this file would be served up via
`` salt://foo/bar/baz.sh `` .
2014-02-18 20:40:48 -06:00
2014-02-08 05:25:07 -06:00
.. conf_master :: hgfs_root
`` hgfs_root ``
2014-02-18 20:40:48 -06:00
***** ***** ***
2014-02-08 05:25:07 -06:00
.. versionadded :: 0.17.0
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Relative path to a subdirectory within the repository from which Salt should
begin to serve files. This is useful when there are files in the repository
that should not be available to the Salt fileserver. Can be used in conjunction
with :conf_master:`hgfs_mountpoint` . If used, then from Salt's perspective the
directories above the one specified will be ignored and the relative path will
(for the purposes of hgfs) be considered as the root of the repo.
2014-02-08 05:25:07 -06:00
.. code-block :: yaml
hgfs_root: somefolder/otherfolder
2014-07-15 16:53:29 -06:00
.. versionchanged :: 2014.7.0
2014-02-18 20:40:48 -06:00
Ability to specify hgfs roots on a per-remote basis was added. See
:conf_master:`here <hgfs_remotes>` for more info.
2014-02-08 05:25:07 -06:00
.. conf_master :: hgfs_base
`` hgfs_base ``
2014-02-18 20:40:48 -06:00
***** ***** ***
2014-02-08 05:25:07 -06:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.1.0
2014-02-08 05:25:07 -06:00
Default: `` default ``
2014-02-08 13:14:43 -06:00
Defines which branch should be used as the `` base `` environment. Change this if
:conf_master:`hgfs_branch_method` is set to `` bookmarks `` to specify which
bookmark should be used as the `` base `` environment.
2014-02-08 05:25:07 -06:00
.. code-block :: yaml
hgfs_base: salt
2017-05-06 23:04:08 -05:00
.. conf_master :: hgfs_saltenv_whitelist
2014-04-08 16:13:29 -05:00
2017-05-06 23:04:08 -05:00
`` hgfs_saltenv_whitelist ``
***** ***** ***** ***** ***** *
2014-04-08 16:13:29 -05:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` hgfs_env_whitelist `` to `` hgfs_saltenv_whitelist ``
2014-04-08 16:13:29 -05:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
2014-04-11 11:39:13 -05:00
if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
and regular expressions are supported. If using a regular expression, the
expression must match the entire minion ID.
2014-04-08 16:13:29 -05:00
If used, only branches/bookmarks/tags which match one of the specified
expressions will be exposed as fileserver environments.
2017-05-06 23:04:08 -05:00
If used in conjunction with :conf_master:`hgfs_saltenv_blacklist` , then the subset
2014-04-11 11:39:13 -05:00
of branches/bookmarks/tags which match the whitelist but do *not* match the
blacklist will be exposed as fileserver environments.
2014-04-08 16:13:29 -05:00
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
hgfs_saltenv_whitelist:
2014-04-08 16:13:29 -05:00
- base
- v1.*
- 'mybranch\d+'
2017-05-06 23:04:08 -05:00
.. conf_master :: hgfs_saltenv_blacklist
2014-04-08 16:13:29 -05:00
2017-05-06 23:04:08 -05:00
`` hgfs_saltenv_blacklist ``
***** ***** ***** ***** ***** *
2014-04-08 16:13:29 -05:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` hgfs_env_blacklist `` to `` hgfs_saltenv_blacklist ``
2014-04-08 16:13:29 -05:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
2014-04-11 11:39:13 -05:00
if your hgfs remotes contain many branches/bookmarks/tags. Full names, globs,
and regular expressions are supported. If using a regular expression, the
expression must match the entire minion ID.
2014-04-08 16:13:29 -05:00
If used, branches/bookmarks/tags which match one of the specified expressions
will *not* be exposed as fileserver environments.
2017-05-06 23:04:08 -05:00
If used in conjunction with :conf_master:`hgfs_saltenv_whitelist` , then the subset
2014-04-11 11:39:13 -05:00
of branches/bookmarks/tags which match the whitelist but do *not* match the
blacklist will be exposed as fileserver environments.
2014-04-08 16:13:29 -05:00
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
hgfs_saltenv_blacklist:
2014-04-08 16:13:29 -05:00
- base
- v1.*
- 'mybranch\d+'
2017-12-05 00:06:54 -06:00
.. conf_master :: hgfs_update_interval
`` hgfs_update_interval ``
***** ***** ***** ***** *** *
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the update interval (in seconds) for
:conf_master:`hgfs_remotes` .
.. code-block :: yaml
hgfs_update_interval: 120
svnfs: Subversion Remote File Server Backend
--------------------------------------------
2014-02-20 03:21:36 -06:00
.. conf_master :: svnfs_remotes
`` svnfs_remotes ``
2014-02-26 12:52:22 -07:00
***** ***** ***** **
2014-02-20 03:21:36 -06:00
.. versionadded :: 0.17.0
Default: `` [] ``
When using the `` svn `` fileserver backend at least one subversion remote needs
to be defined. The user running the salt master will need read access to the
repo.
The repos will be searched in order to find the file requested by a client and
the first repo to have the file will return it. The trunk, branches, and tags
become environments, with the trunk being the `` base `` environment.
.. code-block :: yaml
svnfs_remotes:
- svn://foo.com/svn/myproject
.. note ::
2014-07-15 16:53:29 -06:00
As of 2014.7.0, it is possible to have per-repo versions of the following
2014-02-20 03:21:36 -06:00
configuration parameters:
* :conf_master:`svnfs_root`
* :conf_master:`svnfs_mountpoint`
* :conf_master:`svnfs_trunk`
* :conf_master:`svnfs_branches`
* :conf_master:`svnfs_tags`
For example:
.. code-block :: yaml
svnfs_remotes:
- svn://foo.com/svn/project1
- svn://foo.com/svn/project2:
- root: salt
- mountpoint: salt://foo/bar/baz
- svn//foo.com/svn/project3:
- root: salt/states
- branches: branch
- tags: tag
.. conf_master :: svnfs_mountpoint
`` svnfs_mountpoint ``
***** ***** ***** *****
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-20 03:21:36 -06:00
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Specifies a path on the salt fileserver which will be prepended to all files
served by hgfs. This option can be used in conjunction with
:conf_master:`svnfs_root` . It can also be configured on a per-remote basis, see
:conf_master:`here <svnfs_remotes>` for more info.
2014-02-20 03:21:36 -06:00
.. code-block :: yaml
svnfs_mountpoint: salt://foo/bar
.. note ::
The `` salt:// `` protocol designation can be left off (in other words,
2016-02-18 16:34:14 -06:00
`` foo/bar `` and `` salt://foo/bar `` are equivalent). Assuming a file
`` baz.sh `` in the root of an svnfs remote, this file would be served up via
`` salt://foo/bar/baz.sh `` .
2014-02-20 03:21:36 -06:00
.. conf_master :: svnfs_root
`` svnfs_root ``
***** ***** *** *
.. versionadded :: 0.17.0
Default: `` '' ``
2016-02-18 16:34:14 -06:00
Relative path to a subdirectory within the repository from which Salt should
begin to serve files. This is useful when there are files in the repository
that should not be available to the Salt fileserver. Can be used in conjunction
with :conf_master:`svnfs_mountpoint` . If used, then from Salt's perspective the
directories above the one specified will be ignored and the relative path will
(for the purposes of svnfs) be considered as the root of the repo.
2014-02-20 03:21:36 -06:00
.. code-block :: yaml
svnfs_root: somefolder/otherfolder
2014-07-15 16:53:29 -06:00
.. versionchanged :: 2014.7.0
2014-02-20 03:21:36 -06:00
Ability to specify svnfs roots on a per-remote basis was added. See
:conf_master:`here <svnfs_remotes>` for more info.
.. conf_master :: svnfs_trunk
`` svnfs_trunk ``
***** ***** *****
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-20 03:21:36 -06:00
Default: `` trunk ``
Path relative to the root of the repository where the trunk is located. Can
also be configured on a per-remote basis, see :conf_master:`here
<svnfs_remotes> ` for more info.
.. code-block :: yaml
svnfs_trunk: trunk
.. conf_master :: svnfs_branches
`` svnfs_branches ``
***** ***** ***** ***
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-20 03:21:36 -06:00
Default: `` branches ``
Path relative to the root of the repository where the branches are located. Can
also be configured on a per-remote basis, see :conf_master:`here
<svnfs_remotes> ` for more info.
.. code-block :: yaml
svnfs_branches: branches
.. conf_master :: svnfs_tags
`` svnfs_tags ``
***** ***** *** *
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-02-20 03:21:36 -06:00
Default: `` tags ``
2014-10-15 22:36:12 -05:00
Path relative to the root of the repository where the tags are located. Can
also be configured on a per-remote basis, see :conf_master:`here
<svnfs_remotes> ` for more info.
2014-02-20 03:21:36 -06:00
.. code-block :: yaml
svnfs_tags: tags
2017-05-06 23:04:08 -05:00
.. conf_master :: svnfs_saltenv_whitelist
2014-04-11 11:39:13 -05:00
2017-05-06 23:04:08 -05:00
`` svnfs_saltenv_whitelist ``
***** ***** ***** ***** ***** **
2014-04-11 11:39:13 -05:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` svnfs_env_whitelist `` to `` svnfs_saltenv_whitelist ``
2014-04-11 11:39:13 -05:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
if your svnfs remotes contain many branches/tags. Full names, globs, and
regular expressions are supported. If using a regular expression, the expression
must match the entire minion ID.
If used, only branches/tags which match one of the specified expressions will
be exposed as fileserver environments.
2017-05-06 23:04:08 -05:00
If used in conjunction with :conf_master:`svnfs_saltenv_blacklist` , then the subset
2014-04-11 11:39:13 -05:00
of branches/tags which match the whitelist but do *not* match the blacklist
will be exposed as fileserver environments.
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
svnfs_saltenv_whitelist:
2014-04-11 11:39:13 -05:00
- base
- v1.*
- 'mybranch\d+'
2017-05-06 23:04:08 -05:00
.. conf_master :: svnfs_saltenv_blacklist
2014-04-11 11:39:13 -05:00
2017-05-06 23:04:08 -05:00
`` svnfs_saltenv_blacklist ``
***** ***** ***** ***** ***** **
2014-04-11 11:39:13 -05:00
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2018-02-21 21:47:41 -06:00
.. versionchanged :: 2018.3.0
2017-05-06 23:04:08 -05:00
Renamed from `` svnfs_env_blacklist `` to `` svnfs_saltenv_blacklist ``
2014-04-11 11:39:13 -05:00
Default: `` [] ``
Used to restrict which environments are made available. Can speed up state runs
if your svnfs remotes contain many branches/tags. Full names, globs, and
regular expressions are supported. If using a regular expression, the
expression must match the entire minion ID.
If used, branches/tags which match one of the specified expressions will *not*
be exposed as fileserver environments.
2017-05-06 23:04:08 -05:00
If used in conjunction with :conf_master:`svnfs_saltenv_whitelist` , then the subset
2014-04-11 11:39:13 -05:00
of branches/tags which match the whitelist but do *not* match the blacklist
will be exposed as fileserver environments.
.. code-block :: yaml
2017-05-06 23:04:08 -05:00
svnfs_saltenv_blacklist:
2014-04-11 11:39:13 -05:00
- base
- v1.*
- 'mybranch\d+'
2017-12-05 00:06:54 -06:00
.. conf_master :: svnfs_update_interval
`` svnfs_update_interval ``
***** ***** ***** ***** *****
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the update interval (in seconds) for
:conf_master:`svnfs_remotes` .
.. code-block :: yaml
svnfs_update_interval: 120
minionfs: MinionFS Remote File Server Backend
---------------------------------------------
2014-04-07 11:29:24 -05:00
.. conf_master :: minionfs_env
`` minionfs_env ``
***** ***** ***** *
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-04-07 11:29:24 -05:00
Default: `` base ``
Environment from which MinionFS files are made available.
.. code-block :: yaml
minionfs_env: minionfs
.. conf_master :: minionfs_mountpoint
`` minionfs_mountpoint ``
***** ***** ***** ***** ***
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-04-07 11:29:24 -05:00
Default: `` '' ``
Specifies a path on the salt fileserver from which minionfs files are served.
.. code-block :: yaml
minionfs_mountpoint: salt://foo/bar
.. note ::
The `` salt:// `` protocol designation can be left off (in other words,
`` foo/bar `` and `` salt://foo/bar `` are equivalent).
.. conf_master :: minionfs_whitelist
`` minionfs_whitelist ``
***** ***** ***** ***** **
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-04-07 11:29:24 -05:00
Default: `` [] ``
2014-04-11 11:39:13 -05:00
Used to restrict which minions' pushed files are exposed via minionfs. If using
2014-04-07 11:29:24 -05:00
a regular expression, the expression must match the entire minion ID.
If used, only the pushed files from minions which match one of the specified
expressions will be exposed.
If used in conjunction with :conf_master:`minionfs_blacklist` , then the subset
of hosts which match the whitelist but do *not* match the blacklist will be
exposed.
.. code-block :: yaml
minionfs_whitelist:
2016-09-22 18:22:03 -05:00
- server01
- dev*
- 'mail\d+.mydomain.tld'
2014-04-07 11:29:24 -05:00
.. conf_master :: minionfs_blacklist
`` minionfs_blacklist ``
***** ***** ***** ***** **
2014-07-15 16:53:29 -06:00
.. versionadded :: 2014.7.0
2014-04-07 11:29:24 -05:00
Default: `` [] ``
2014-04-11 11:39:13 -05:00
Used to restrict which minions' pushed files are exposed via minionfs. If using
2014-04-07 11:29:24 -05:00
a regular expression, the expression must match the entire minion ID.
If used, only the pushed files from minions which match one of the specified
expressions will *not* be exposed.
If used in conjunction with :conf_master:`minionfs_whitelist` , then the subset
of hosts which match the whitelist but do *not* match the blacklist will be
exposed.
.. code-block :: yaml
minionfs_blacklist:
2016-09-22 18:22:03 -05:00
- server01
- dev*
- 'mail\d+.mydomain.tld'
2014-04-07 11:29:24 -05:00
2017-12-05 00:06:54 -06:00
.. conf_master :: minionfs_update_interval
`` minionfs_update_interval ``
***** ***** ***** ***** ***** ***
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the update interval (in seconds) for :ref:`MinionFS
<tutorial-minionfs> `.
.. note ::
Since :ref: `MinionFS <tutorial-minionfs>` consists of files local to the
master, the update process for this fileserver backend just reaps the cache
for this backend.
.. code-block :: yaml
minionfs_update_interval: 120
s3fs: S3 File Server Backend
----------------------------
.. versionadded :: 0.16.0
See the :mod: `s3fs documentation <salt.fileserver.s3fs>` for usage examples.
.. conf_master :: s3fs_update_interval
`` s3fs_update_interval ``
***** ***** ***** ***** *** *
2018-02-21 21:47:41 -06:00
.. versionadded :: 2018.3.0
2017-12-05 00:06:54 -06:00
Default: `` 60 ``
This option defines the update interval (in seconds) for s3fs.
.. code-block :: yaml
s3fs_update_interval: 120
2023-03-24 18:07:07 -07:00
`` fileserver_interval ``
***** ***** ***** ***** ***
.. versionadded :: 3006.0
Default: `` 3600 ``
Defines how often to restart the master's FilesServerUpdate process.
.. code-block :: yaml
fileserver_interval: 9600
2014-01-03 19:22:44 -06:00
2016-12-22 11:32:37 -06:00
.. _pillar-configuration-master:
2012-08-27 13:53:25 -05:00
2012-04-27 13:13:42 -06:00
Pillar Configuration
2013-08-07 23:50:51 +01:00
====================
2012-04-27 13:13:42 -06:00
.. conf_master :: pillar_roots
`` pillar_roots ``
----------------
2022-01-27 08:05:13 -05:00
.. versionchanged :: 3005
2013-08-03 18:53:05 -05:00
Default:
2012-04-27 13:13:42 -06:00
2013-08-03 18:53:05 -05:00
.. code-block :: yaml
base:
- /srv/pillar
Set the environments and directories used to hold pillar sls data. This
configuration is the same as :conf_master:`file_roots` :
2012-04-27 13:13:42 -06:00
2019-12-31 14:03:48 +01:00
As of 2017.7.5 and 2018.3.1, it is possible to have `__env__` as a catch-all environment.
Example:
2012-04-27 13:13:42 -06:00
.. code-block :: yaml
2012-11-12 10:12:40 +04:00
pillar_roots:
2012-04-27 13:13:42 -06:00
base:
2013-08-03 18:53:05 -05:00
- /srv/pillar
2012-04-27 13:13:42 -06:00
dev:
2013-08-03 18:53:05 -05:00
- /srv/pillar/dev
2012-04-27 13:13:42 -06:00
prod:
2013-08-03 18:53:05 -05:00
- /srv/pillar/prod
2019-12-31 14:03:48 +01:00
__env__:
- /srv/pillar/others
2012-04-27 13:13:42 -06:00
2022-01-27 08:05:13 -05:00
Taking dynamic environments one step further, `` __env__ `` can also be used in
the `` pillar_roots `` filesystem path as of version 3005. It will be replaced
with the actual `` pillarenv `` and searched for Pillar data to provide to the
2022-01-28 22:50:37 -05:00
minion. Note this substitution ONLY occurs for the `` __env__ `` environment. For
instance, this configuration:
2022-01-27 08:05:13 -05:00
.. code-block :: yaml
pillar_roots:
__env__:
- /srv/__env__/pillar
is equivalent to this static configuration:
.. code-block :: yaml
pillar_roots:
dev:
- /srv/dev/pillar
test:
- /srv/test/pillar
prod:
- /srv/prod/pillar
2017-01-25 15:08:57 -06:00
.. conf_master :: on_demand_ext_pillar
2017-01-25 14:43:14 -06:00
2017-01-25 15:08:57 -06:00
`` on_demand_ext_pillar ``
------------------------
2017-01-25 14:43:14 -06:00
2017-06-14 11:36:06 -06:00
.. versionadded :: 2016.3.6,2016.11.3,2017.7.0
2017-01-25 14:43:14 -06:00
Default: `` ['libvirt', 'virtkey'] ``
The external pillars permitted to be used on-demand using :py:func:`pillar.ext
<salt.modules.pillar.ext> `.
.. code-block :: yaml
2017-01-25 15:08:57 -06:00
on_demand_ext_pillar:
2017-01-25 14:43:14 -06:00
- libvirt
- virtkey
- git
.. warning ::
This will allow minions to request specific pillar data via
:py:func: `pillar.ext <salt.modules.pillar.ext>` , and may be considered a
security risk. However, pillar data generated in this way will not affect
the :ref: `in-memory pillar data <pillar-in-memory>` , so this risk is
limited to instances in which states/modules/etc. (built-in or custom) rely
upon pillar data generated by :py:func:`pillar.ext
<salt.modules.pillar.ext>`.
2017-01-28 01:03:03 -06:00
.. conf_master :: decrypt_pillar
`` decrypt_pillar ``
------------------
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-01-28 01:03:03 -06:00
Default: `` [] ``
A list of paths to be recursively decrypted during pillar compilation.
.. code-block :: yaml
decrypt_pillar:
- 'foo:bar': gpg
- 'lorem:ipsum:dolor'
Entries in this list can be formatted either as a simple string, or as a
key/value pair, with the key being the pillar location, and the value being the
renderer to use for pillar decryption. If the former is used, the renderer
specified by :conf_master:`decrypt_pillar_default` will be used.
.. conf_master :: decrypt_pillar_delimiter
`` decrypt_pillar_delimiter ``
----------------------------
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-01-28 01:03:03 -06:00
Default: `` : ``
The delimiter used to distinguish nested data structures in the
:conf_master:`decrypt_pillar` option.
.. code-block :: yaml
decrypt_pillar_delimiter: '|'
decrypt_pillar:
- 'foo|bar': gpg
- 'lorem|ipsum|dolor'
.. conf_master :: decrypt_pillar_default
`` decrypt_pillar_default ``
--------------------------
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-01-28 01:03:03 -06:00
Default: `` gpg ``
The default renderer used for decryption, if one is not specified for a given
pillar key in :conf_master:`decrypt_pillar` .
.. code-block :: yaml
decrypt_pillar_default: my_custom_renderer
.. conf_master :: decrypt_pillar_renderers
`` decrypt_pillar_renderers ``
----------------------------
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-01-28 01:03:03 -06:00
Default: `` ['gpg'] ``
List of renderers which are permitted to be used for pillar decryption.
.. code-block :: yaml
decrypt_pillar_renderers:
- gpg
- my_custom_renderer
2021-12-08 17:24:37 +00:00
.. conf_master :: gpg_decrypt_must_succeed
`` gpg_decrypt_must_succeed ``
----------------------------
.. versionadded :: 3005
Default: `` False ``
If this is `` True `` and the ciphertext could not be decrypted, then an error is
raised.
Sending the ciphertext through basically is *never* desired, for example if a
state is setting a database password from pillar and gpg rendering fails, then
the state will update the password to the ciphertext, which by definition is
not encrypted.
.. warning ::
The value defaults to `` False `` for backwards compatibility. In the
`` Chlorine `` release, this option will default to `` True `` .
.. code-block :: yaml
gpg_decrypt_must_succeed: False
2016-05-24 13:19:20 -06:00
.. conf_master :: pillar_opts
`` pillar_opts ``
---------------
Default: `` False ``
The `` pillar_opts `` option adds the master configuration file data to a dict in
the pillar called `` master `` . This can be used to set simple configurations in
the master config file that can then be used on minions.
Note that setting this option to `` True `` means the master config file will be
included in all minion's pillars. While this makes global configuration of services
and systems easy, it may not be desired if sensitive data is stored in the master
configuration.
.. code-block :: yaml
pillar_opts: False
2017-07-14 17:26:02 -06:00
.. conf_master :: pillar_safe_render_error
`` pillar_safe_render_error ``
----------------------------
Default: `` True ``
The pillar_safe_render_error option prevents the master from passing pillar
render errors to the minion. This is set on by default because the error could
contain templating data which would give that minion information it shouldn't
have, like a password! When set `` True `` the error message will only show:
.. code-block :: shell
Rendering SLS 'my.sls' failed. Please see master log for details.
.. code-block :: yaml
pillar_safe_render_error: True
2016-04-25 15:26:09 -06:00
.. _master-configuration-ext-pillar:
2012-04-27 13:13:42 -06:00
.. conf_master :: ext_pillar
`` ext_pillar ``
--------------
The ext_pillar option allows for any number of external pillar interfaces to be
called when populating pillar data. The configuration is based on ext_pillar
2013-10-03 15:41:37 -06:00
functions. The available ext_pillar functions can be found herein:
:blob: `salt/pillar`
By default, the ext_pillar interface is not configured to run.
2012-04-27 13:13:42 -06:00
2016-03-31 13:50:51 -06:00
Default: `` [] ``
2012-04-27 13:13:42 -06:00
.. code-block :: yaml
ext_pillar:
- hiera: /etc/hiera.yaml
2012-09-27 19:28:08 -06:00
- cmd_yaml: cat /etc/salt/yaml
2013-06-26 13:38:37 +02:00
- reclass:
inventory_base_uri: /etc/reclass
2012-04-27 13:13:42 -06:00
2012-08-27 13:53:25 -05:00
There are additional details at :ref: `salt-pillars`
2012-04-27 13:13:42 -06:00
2014-08-31 16:46:22 -05:00
.. conf_master :: ext_pillar_first
`` ext_pillar_first ``
2014-09-03 15:22:26 -04:00
--------------------
2014-08-31 16:46:22 -05:00
2015-05-06 09:27:40 -05:00
.. versionadded :: 2015.5.0
2015-03-11 11:53:59 -04:00
2015-07-21 16:42:39 -05:00
Default: `` False ``
This option allows for external pillar sources to be evaluated before
2016-11-29 15:24:11 -06:00
:conf_master:`pillar_roots` . External pillar data is evaluated separately from
:conf_master:`pillar_roots` pillar data, and then both sets of pillar data are
merged into a single pillar dictionary, so the value of this config option will
have an impact on which key "wins" when there is one of the same name in both
the external pillar data and :conf_master:`pillar_roots` pillar data. By
setting this option to `` True `` , ext_pillar keys will be overridden by
:conf_master:`pillar_roots` , while leaving it as `` False `` will allow
ext_pillar keys to override those from :conf_master:`pillar_roots` .
.. note ::
For a while, this config option did not work as specified above, because of
a bug in Pillar compilation. This bug has been resolved in version 2016.3.4
and later.
2014-08-31 16:46:22 -05:00
2015-07-21 16:42:39 -05:00
.. code-block :: yaml
ext_pillar_first: False
2020-04-16 14:34:26 -06:00
.. conf_master :: pillarenv_from_saltenv
2017-01-18 09:36:55 -05:00
`` pillarenv_from_saltenv ``
--------------------------
Default: `` False ``
When set to `` True `` , the :conf_master:`pillarenv` value will assume the value
of the effective saltenv when running states. This essentially makes `` salt-run
pillar.show_pillar saltenv=dev`` equivalent to ` ` salt-run pillar.show_pillar
saltenv=dev pillarenv=dev`` . If :conf_master: ` pillarenv ` is set on the CLI, it
will override this option.
.. code-block :: yaml
pillarenv_from_saltenv: True
.. note ::
For salt remote execution commands this option should be set in the Minion
configuration instead.
2016-08-16 14:57:58 -06:00
.. conf_master :: pillar_raise_on_missing
`` pillar_raise_on_missing ``
---------------------------
.. versionadded :: 2015.5.0
Default: `` False ``
Set this option to `` True `` to force a `` KeyError `` to be raised whenever an
attempt to retrieve a named value from pillar fails. When this option is set
to `` False `` , the failed attempt returns an empty string.
2016-04-25 15:26:09 -06:00
.. _git-pillar-config-opts:
2015-07-21 16:42:39 -05:00
Git External Pillar (git_pillar) Configuration Options
------------------------------------------------------
2015-08-09 02:53:36 -05:00
.. conf_master :: git_pillar_provider
`` git_pillar_provider ``
***** ***** ***** ***** ***
.. versionadded :: 2015.8.0
Specify the provider to be used for git_pillar. Must be either `` pygit2 `` or
`` gitpython `` . If unset, then both will be tried in that same order, and the
first one with a compatible version installed will be the provider that is
used.
.. code-block :: yaml
git_pillar_provider: gitpython
2015-07-21 16:42:39 -05:00
.. conf_master :: git_pillar_base
`` git_pillar_base ``
***** ***** ***** *** *
.. versionadded :: 2015.8.0
Default: `` master ``
If the desired branch matches this value, and the environment is omitted from
the git_pillar configuration, then the environment for that git_pillar remote
will be `` base `` . For example, in the configuration below, the `` foo ``
branch/tag would be assigned to the `` base `` environment, while `` bar `` would
be mapped to the `` bar `` environment.
.. code-block :: yaml
git_pillar_base: foo
ext_pillar:
- git:
- foo https://mygitserver/git-pillar.git
- bar https://mygitserver/git-pillar.git
.. conf_master :: git_pillar_branch
`` git_pillar_branch ``
***** ***** ***** ***** *
.. versionadded :: 2015.8.0
Default: `` master ``
If the branch is omitted from a git_pillar remote, then this branch will be
used instead. For example, in the configuration below, the first two remotes
would use the `` pillardata `` branch/tag, while the third would use the `` foo ``
branch/tag.
.. code-block :: yaml
git_pillar_branch: pillardata
ext_pillar:
- git:
- https://mygitserver/pillar1.git
- https://mygitserver/pillar2.git:
- root: pillar
- foo https://mygitserver/pillar3.git
.. conf_master :: git_pillar_env
`` git_pillar_env ``
***** ***** ***** ***
.. versionadded :: 2015.8.0
Default: `` '' `` (unset)
Environment to use for git_pillar remotes. This is normally derived from the
branch/tag (or from a per-remote `` env `` parameter), but if set this will
override the process of deriving the env from the branch/tag name. For example,
in the configuration below the `` foo `` branch would be assigned to the `` base ``
environment, while the `` bar `` branch would need to explicitly have `` bar ``
2020-02-26 00:57:58 +03:00
configured as its environment to keep it from also being mapped to the
2015-07-21 16:42:39 -05:00
`` base `` environment.
.. code-block :: yaml
git_pillar_env: base
ext_pillar:
- git:
- foo https://mygitserver/git-pillar.git
- bar https://mygitserver/git-pillar.git:
- env: bar
For this reason, this option is recommended to be left unset, unless the use
case calls for all (or almost all) of the git_pillar remotes to use the same
environment irrespective of the branch/tag being used.
.. conf_master :: git_pillar_root
`` git_pillar_root ``
2015-08-09 02:53:36 -05:00
***** ***** ***** *** *
2015-07-21 16:42:39 -05:00
.. versionadded :: 2015.8.0
Default: `` '' ``
Path relative to the root of the repository where the git_pillar top file and
SLS files are located. In the below configuration, the pillar top file and SLS
files would be looked for in a subdirectory called `` pillar `` .
.. code-block :: yaml
git_pillar_root: pillar
ext_pillar:
- git:
- master https://mygitserver/pillar1.git
- master https://mygitserver/pillar2.git
.. note ::
This is a global option. If only one or two repos need to have their files
sourced from a subdirectory, then :conf_master:`git_pillar_root` can be
omitted and the root can be specified on a per-remote basis, like so:
.. code-block :: yaml
ext_pillar:
- git:
- master https://mygitserver/pillar1.git
- master https://mygitserver/pillar2.git:
- root: pillar
In this example, for the first remote the top file and SLS files would be
looked for in the root of the repository, while in the second remote the
pillar data would be retrieved from the `` pillar `` subdirectory.
.. conf_master :: git_pillar_ssl_verify
`` git_pillar_ssl_verify ``
***** ***** ***** ***** *****
.. versionadded :: 2015.8.0
2016-10-27 15:26:30 -06:00
.. versionchanged :: 2016.11.0
2015-07-21 16:42:39 -05:00
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
Default: `` False ``
2015-07-21 16:42:39 -05:00
Specifies whether or not to ignore SSL certificate errors when contacting the
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
remote repository. The `` False `` setting is useful if you're using a
2015-08-09 02:53:36 -05:00
git repo that uses a self-signed certificate. However, keep in mind that
setting this to anything other `` True `` is a considered insecure, and using an
SSH-based transport (if available) may be a better option.
2015-07-21 16:42:39 -05:00
2016-10-27 15:26:30 -06:00
In the 2016.11.0 release, the default config value changed from `` False `` to
2016-04-06 15:34:02 -06:00
`` True `` .
2015-07-21 16:42:39 -05:00
.. code-block :: yaml
git_pillar_ssl_verify: True
2017-05-05 17:01:32 -05:00
.. note ::
pygit2 only supports disabling SSL verification in versions 0.23.2 and
newer.
2016-04-18 08:40:20 -06:00
.. conf_master :: git_pillar_global_lock
`` git_pillar_global_lock ``
***** ***** ***** ***** ***** *
.. versionadded :: 2015.8.9
Default: `` True ``
When set to `` False `` , if there is an update/checkout lock for a git_pillar
remote and the pid written to it is not running on the master, the lock file
will be automatically cleared and a new lock will be obtained. When set to
`` True `` , Salt will simply log a warning when there is an lock present.
On single-master deployments, disabling this option can help automatically deal
with instances where the master was shutdown/restarted during the middle of a
git_pillar update/checkout, leaving a lock in place.
However, on multi-master deployments with the git_pillar cachedir shared via
`GlusterFS`__ , nfs, or another network filesystem, it is strongly recommended
not to disable this option as doing so will cause lock files to be removed if
they were created by a different master.
.. code-block :: yaml
# Disable global lock
git_pillar_global_lock: False
.. __: http://www.gluster.org/
2017-01-09 01:24:18 -06:00
.. conf_master :: git_pillar_includes
`` git_pillar_includes ``
***** ***** ***** ***** ***
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-01-09 01:24:18 -06:00
Default: `` True ``
Normally, when processing :ref:`git_pillar remotes
2017-05-12 13:29:48 -06:00
<git-pillar-configuration> `, if more than one repo under the same ` `git` `
2017-01-09 01:24:18 -06:00
section in the `` ext_pillar `` configuration refers to the same pillar
environment, then each repo in a given environment will have access to the
other repos' files to be referenced in their top files. However, it may be
desirable to disable this behavior. If so, set this value to `` False `` .
For a more detailed examination of how includes work, see :ref:`this
explanation <git-pillar-multiple-remotes>` from the git_pillar documentation.
.. code-block :: yaml
git_pillar_includes: False
2019-06-27 15:41:49 +02:00
`` git_pillar_update_interval ``
***** ***** ***** ***** ***** *****
2020-01-15 18:25:22 +00:00
.. versionadded :: 3000
2019-06-27 15:41:49 +02:00
Default: `` 60 ``
This option defines the default update interval (in seconds) for git_pillar
remotes. The update is handled within the global loop, hence
`` git_pillar_update_interval `` should be a multiple of `` loop_interval `` .
.. code-block :: yaml
git_pillar_update_interval: 120
2016-04-25 15:26:09 -06:00
.. _git-ext-pillar-auth-opts:
2016-04-18 08:40:20 -06:00
2015-08-09 02:53:36 -05:00
Git External Pillar Authentication Options
***** ***** ***** ***** ***** ***** ***** ***** **
2015-07-21 16:42:39 -05:00
2015-08-09 02:53:36 -05:00
These parameters only currently apply to the `` pygit2 ``
2017-02-09 10:50:45 -06:00
:conf_master:`git_pillar_provider` . Authentication works the same as it does
2015-08-09 02:53:36 -05:00
in gitfs, as outlined in the :ref: `GitFS Walkthrough <gitfs-authentication>` ,
though the global configuration options are named differently to reflect that
they are for git_pillar instead of gitfs.
2015-07-21 16:42:39 -05:00
.. conf_master :: git_pillar_user
`` git_pillar_user ``
~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`git_pillar_password` , is used to authenticate to HTTPS
remotes.
.. code-block :: yaml
git_pillar_user: git
.. conf_master :: git_pillar_password
`` git_pillar_password ``
~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`git_pillar_user` , is used to authenticate to HTTPS
remotes. This parameter is not required if the repository does not use
authentication.
.. code-block :: yaml
git_pillar_password: mypassword
.. conf_master :: git_pillar_insecure_auth
`` git_pillar_insecure_auth ``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
2014-08-31 16:46:22 -05:00
Default: `` False ``
2015-07-21 16:42:39 -05:00
By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
parameter enables authentication over HTTP. **Enable this at your own risk.**
2014-08-31 16:46:22 -05:00
.. code-block :: yaml
2015-07-21 16:42:39 -05:00
git_pillar_insecure_auth: True
.. conf_master :: git_pillar_pubkey
`` git_pillar_pubkey ``
~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`git_pillar_privkey` (and optionally
:conf_master:`git_pillar_passphrase` ), is used to authenticate to SSH remotes.
.. code-block :: yaml
git_pillar_pubkey: /path/to/key.pub
.. conf_master :: git_pillar_privkey
`` git_pillar_privkey ``
~~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`git_pillar_pubkey` (and optionally
:conf_master:`git_pillar_passphrase` ), is used to authenticate to SSH remotes.
.. code-block :: yaml
git_pillar_privkey: /path/to/key
.. conf_master :: git_pillar_passphrase
`` git_pillar_passphrase ``
~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded :: 2015.8.0
Default: `` '' ``
This parameter is optional, required only when the SSH key being used to
authenticate is protected by a passphrase.
.. code-block :: yaml
git_pillar_passphrase: mypassphrase
2014-08-31 16:46:22 -05:00
2017-02-09 10:50:45 -06:00
.. conf_master :: git_pillar_refspecs
`` git_pillar_refspecs ``
~~~~~~~~~~~~~~~~~~~~~~~
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-09 10:50:45 -06:00
Default: `` ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] ``
When fetching from remote repositories, by default Salt will fetch branches and
tags. This parameter can be used to override the default and specify
alternate refspecs to be fetched. This parameter works similarly to its
2018-05-28 16:13:12 -05:00
:ref: `GitFS counterpart <gitfs-custom-refspecs>` , in that it can be
2017-02-09 10:50:45 -06:00
configured both globally and for individual remotes.
.. code-block :: yaml
git_pillar_refspecs:
- '+refs/heads/*:refs/remotes/origin/* '
- '+refs/tags/*:refs/tags/* '
- '+refs/pull/*/head:refs/remotes/origin/pr/* '
- '+refs/pull/*/merge:refs/remotes/origin/merge/* '
2017-02-27 20:21:53 -06:00
.. conf_master :: git_pillar_verify_config
`` git_pillar_verify_config ``
----------------------------
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-27 20:21:53 -06:00
Default: `` True ``
By default, as the master starts it performs some sanity checks on the
configured git_pillar repositories. If any of these sanity checks fail (such as
when an invalid configuration is used), the master daemon will abort.
To skip these sanity checks, set this option to `` False `` .
.. code-block :: yaml
git_pillar_verify_config: False
2016-04-25 15:26:09 -06:00
.. _pillar-merging-opts:
Pillar Merging Options
----------------------
2014-04-09 06:39:46 +02:00
.. conf_master :: pillar_source_merging_strategy
`` pillar_source_merging_strategy ``
2016-04-25 15:26:09 -06:00
***** ***** ***** ***** ***** ***** *** *
2014-04-09 06:39:46 +02:00
2014-08-07 15:30:24 -05:00
.. versionadded :: 2014.7.0
2014-04-09 06:39:46 +02:00
Default: `` smart ``
2014-08-11 10:20:28 -07:00
The pillar_source_merging_strategy option allows you to configure merging
2016-09-22 08:35:50 +02:00
strategy between different sources. It accepts 5 values:
2014-04-09 06:39:46 +02:00
2016-09-20 11:05:17 +02:00
* `` none `` :
2018-05-28 16:13:12 -05:00
2016-09-21 17:34:09 +02:00
It will not do any merging at all and only parse the pillar data from the passed environment and 'base' if no environment was specified.
2016-09-20 11:05:17 +02:00
2018-05-28 16:13:12 -05:00
.. versionadded :: 2016.3.4
2016-04-25 15:26:09 -06:00
* `` recurse `` :
2014-04-09 06:39:46 +02:00
2018-05-28 16:13:12 -05:00
It will recursively merge data. For example, theses 2 sources:
2014-04-09 06:39:46 +02:00
.. code-block :: yaml
foo: 42
bar:
element1: True
.. code-block :: yaml
bar:
element2: True
baz: quux
will be merged as:
.. code-block :: yaml
foo: 42
bar:
element1: True
element2: True
baz: quux
2016-04-25 15:26:09 -06:00
* `` aggregate `` :
2014-04-09 06:39:46 +02:00
2015-03-11 21:15:32 +01:00
instructs aggregation of elements between sources that use the #!yamlex renderer.
2014-04-09 06:39:46 +02:00
For example, these two documents:
.. code-block :: yaml
foo: 42
bar: !aggregate {
element1: True
}
baz: !aggregate quux
.. code-block :: yaml
bar: !aggregate {
element2: True
}
baz: !aggregate quux2
will be merged as:
.. code-block :: yaml
foo: 42
bar:
element1: True
element2: True
baz:
- quux
- quux2
2021-01-18 12:24:01 -06:00
.. note ::
This requires that the :ref: `render pipeline <renderers-composing>`
defined in the :conf_master:`renderer` master configuration ends in
`` yamlex `` .
2016-04-25 15:26:09 -06:00
* `` overwrite `` :
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
Will use the behaviour of the 2014.1 branch and earlier.
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
Overwrites elements according the order in which they are processed.
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
First pillar processed:
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
.. code-block :: yaml
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
A:
first_key: blah
second_key: blah
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
Second pillar processed:
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
.. code-block :: yaml
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
A:
third_key: blah
fourth_key: blah
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
will be merged as:
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
.. code-block :: yaml
2014-10-14 13:05:53 -06:00
2015-03-24 14:56:09 -06:00
A:
third_key: blah
fourth_key: blah
2014-10-14 13:05:53 -06:00
2016-04-25 15:26:09 -06:00
* `` smart `` (default):
2014-04-09 06:39:46 +02:00
2015-03-24 14:56:09 -06:00
Guesses the best strategy based on the "renderer" setting.
2014-04-09 06:39:46 +02:00
2018-04-15 14:31:39 -04:00
.. note ::
In order for yamlex based features such as `` !aggregate `` to work as expected
across documents using the default `` smart `` merge strategy, the :conf_master:`renderer`
config option must be set to `` jinja|yamlex `` or similar.
2016-01-19 21:57:45 -07:00
.. conf_master :: pillar_merge_lists
2015-12-29 10:22:54 -07:00
`` pillar_merge_lists ``
2016-04-25 15:26:09 -06:00
***** ***** ***** ***** **
2015-12-29 10:22:54 -07:00
.. versionadded :: 2015.8.0
2016-01-25 08:49:13 -07:00
Default: `` False ``
2015-12-29 10:22:54 -07:00
Recursively merge lists by aggregating them instead of replacing them.
.. code-block :: yaml
2016-01-06 09:55:20 -07:00
pillar_merge_lists: False
2015-12-29 10:22:54 -07:00
2018-03-22 13:32:13 -05:00
.. conf_master :: pillar_includes_override_sls
`` pillar_includes_override_sls ``
***** ***** ***** ***** ***** ***** **
.. versionadded :: 2017.7.6,2018.3.1
Default: `` False ``
Prior to version 2017.7.3, keys from :ref: `pillar includes <pillar-include>`
would be merged on top of the pillar SLS. Since 2017.7.3, the includes are
merged together and then the pillar SLS is merged on top of that.
Set this option to `` True `` to return to the old behavior.
.. code-block :: yaml
pillar_includes_override_sls: True
2016-04-25 15:26:09 -06:00
.. _pillar-cache-opts:
Pillar Cache Options
--------------------
.. conf_master :: pillar_cache
`` pillar_cache ``
***** ***** ***** *
.. versionadded :: 2015.8.8
Default: `` False ``
A master can cache pillars locally to bypass the expense of having to render them
for each minion on every request. This feature should only be enabled in cases
where pillar rendering time is known to be unsatisfactory and any attendant security
concerns about storing pillars in a master cache have been addressed.
When enabling this feature, be certain to read through the additional `` pillar_cache_* ``
configuration options to fully understand the tunable parameters and their implications.
.. code-block :: yaml
pillar_cache: False
.. note ::
Setting `` pillar_cache: True `` has no effect on
:ref: `targeting minions with pillar <targeting-pillar>` .
.. conf_master :: pillar_cache_ttl
`` pillar_cache_ttl ``
***** ***** ***** *****
.. versionadded :: 2015.8.8
Default: `` 3600 ``
If and only if a master has set `` pillar_cache: True `` , the cache TTL controls the amount
of time, in seconds, before the cache is considered invalid by a master and a fresh
pillar is recompiled and stored.
2023-05-02 20:18:48 -05:00
The cache TTL does not prevent pillar cache from being refreshed before its TTL expires.
2016-04-25 15:26:09 -06:00
.. conf_master :: pillar_cache_backend
`` pillar_cache_backend ``
***** ***** ***** ***** *** *
.. versionadded :: 2015.8.8
Default: `` disk ``
If an only if a master has set `` pillar_cache: True `` , one of several storage providers
can be utilized:
* `` disk `` (default):
The default storage backend. This caches rendered pillars to the master cache.
Rendered pillars are serialized and deserialized as `` msgpack `` structures for speed.
Note that pillars are stored UNENCRYPTED. Ensure that the master cache has permissions
set appropriately (sane defaults are provided).
* `` memory `` [EXPERIMENTAL]:
An optional backend for pillar caches which uses a pure-Python
in-memory data structure for maximal performance. There are several caveats,
however. First, because each master worker contains its own in-memory cache,
there is no guarantee of cache consistency between minion requests. This
works best in situations where the pillar rarely if ever changes. Secondly,
and perhaps more importantly, this means that unencrypted pillars will
be accessible to any process which can examine the memory of the `` salt-master `` !
This may represent a substantial security risk.
.. code-block :: yaml
pillar_cache_backend: disk
2014-04-09 06:39:46 +02:00
2017-06-14 15:15:46 -06:00
2017-07-14 17:26:02 -06:00
Master Reactor Settings
=======================
.. conf_master :: reactor
`` reactor ``
-----------
Default: `` [] ``
Defines a salt reactor. See the :ref: `Reactor <reactor>` documentation for more
information.
.. code-block :: yaml
2017-09-01 18:35:01 -05:00
reactor:
- 'salt/minion/*/start':
- salt://reactor/startup_tasks.sls
2017-07-14 17:26:02 -06:00
.. conf_master :: reactor_refresh_interval
`` reactor_refresh_interval ``
----------------------------
Default: `` 60 ``
The TTL for the cache of the reactor configuration.
.. code-block :: yaml
reactor_refresh_interval: 60
.. conf_master :: reactor_worker_threads
`` reactor_worker_threads ``
--------------------------
Default: `` 10 ``
The number of workers for the runner/wheel in the reactor.
.. code-block :: yaml
2017-11-07 10:24:56 +02:00
2017-07-14 17:26:02 -06:00
reactor_worker_threads: 10
.. conf_master :: reactor_worker_hwm
`` reactor_worker_hwm ``
----------------------
Default: `` 10000 ``
The queue size for workers in the reactor.
.. code-block :: yaml
reactor_worker_hwm: 10000
2018-11-29 09:12:18 -05:00
.. _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
2021-02-26 10:57:09 +00:00
.. conf_master :: netapi_disable_clients
`` netapi_enable_clients ``
--------------------------
2022-11-11 13:08:29 +00:00
.. versionadded :: 3006.0
2021-02-26 10:57:09 +00:00
Default: `` [] ``
Used by `` salt-api `` to enable access to the listed clients. Unless a
2022-11-11 13:06:14 +00:00
client is addded to this list, requests will be rejected before
2021-02-26 10:57:09 +00:00
authentication is attempted or processing of the low state occurs.
This can be used to only expose the required functionality via
`` salt-api `` .
Configuration with all possible clients enabled:
.. code-block :: yaml
netapi_enable_clients:
- local
- local_async
- local_batch
- local_subset
- runner
- runner_async
- ssh
- wheel
- wheel_async
.. note ::
2022-11-11 13:06:14 +00:00
Enabling all clients is not recommended - only enable the
clients that provide the functionality required.
2018-11-29 09:12:18 -05:00
2017-06-14 15:15:46 -06:00
.. _syndic-server-settings:
2012-01-13 12:35:56 -07:00
Syndic Server Settings
2013-08-07 23:50:51 +01:00
======================
2012-01-13 12:35:56 -07:00
2016-11-19 13:11:36 +02:00
A Salt syndic is a Salt master used to pass commands from a higher Salt master
to minions below the syndic. Using the syndic is simple. If this is a master
that will have syndic servers(s) below it, set the `` order_masters `` setting to
`` True `` .
2014-10-09 10:14:37 -06:00
If this is a master that will be running a syndic daemon for passthrough the
2016-11-19 13:11:36 +02:00
`` syndic_master `` setting needs to be set to the location of the master server.
2012-01-13 12:35:56 -07:00
2016-11-23 16:53:17 -05:00
Do not forget that, in other words, it means that it shares with the local minion
2016-11-19 13:11:36 +02:00
its ID and PKI directory.
2013-07-13 19:53:11 +00:00
2012-01-13 12:35:56 -07:00
.. conf_master :: order_masters
`` order_masters ``
-----------------
Default: `` False ``
2012-03-08 21:05:52 -07:00
Extra data needs to be sent with publications if the master is controlling a
2012-01-13 12:35:56 -07:00
lower level master via a syndic minion. If this is the case the order_masters
value must be set to True
.. code-block :: yaml
order_masters: False
.. conf_master :: syndic_master
`` syndic_master ``
-----------------
2016-11-30 12:32:36 +02:00
.. versionchanged :: 2016.3.5,2016.11.1
Set default higher level master address.
Default: `` masterofmasters ``
2012-01-13 12:35:56 -07:00
2016-11-19 13:11:36 +02:00
If this master will be running the `` salt-syndic `` to connect to a higher level
2014-10-09 10:14:37 -06:00
master, specify the higher level master with this configuration value.
2012-01-13 12:35:56 -07:00
.. code-block :: yaml
syndic_master: masterofmasters
2015-07-31 15:25:15 -06:00
You can optionally connect a syndic to multiple higher level masters by
2016-11-19 13:11:36 +02:00
setting the `` syndic_master `` value to a list:
2015-07-31 15:25:15 -06:00
.. code-block :: yaml
syndic_master:
- masterofmasters1
- masterofmasters2
2016-11-19 13:11:36 +02:00
Each higher level master must be set up in a multi-master configuration.
2015-07-31 15:25:15 -06:00
2013-07-13 19:53:11 +00:00
.. conf_master :: syndic_master_port
`` syndic_master_port ``
2015-07-31 15:25:15 -06:00
----------------------
2013-07-13 19:53:11 +00:00
Default: `` 4506 ``
2016-11-19 13:11:36 +02:00
If this master will be running the `` salt-syndic `` to connect to a higher level
2014-10-09 10:14:37 -06:00
master, specify the higher level master port with this configuration value.
2013-07-13 19:53:11 +00:00
.. code-block :: yaml
syndic_master_port: 4506
2016-05-16 14:51:13 -06:00
.. conf_master :: syndic_pidfile
2013-07-13 19:53:11 +00:00
`` syndic_pidfile ``
------------------
2016-11-19 13:11:36 +02:00
Default: `` /var/run/salt-syndic.pid ``
2013-07-13 19:53:11 +00:00
2016-11-19 13:11:36 +02:00
If this master will be running the `` salt-syndic `` to connect to a higher level
2013-07-13 19:53:11 +00:00
master, specify the pidfile of the syndic daemon.
.. code-block :: yaml
2016-11-19 13:11:36 +02:00
syndic_pidfile: /var/run/syndic.pid
2013-07-13 19:53:11 +00:00
2016-05-16 14:51:13 -06:00
.. conf_master :: syndic_log_file
2014-01-12 05:23:09 +00:00
`` syndic_log_file ``
-------------------
2016-11-19 13:11:36 +02:00
Default: `` /var/log/salt/syndic ``
2014-01-12 05:23:09 +00:00
2016-11-19 13:11:36 +02:00
If this master will be running the `` salt-syndic `` to connect to a higher level
master, specify the log file of the syndic daemon.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2016-11-19 13:11:36 +02:00
syndic_log_file: /var/log/salt-syndic.log
2014-01-12 05:23:09 +00:00
2016-11-08 17:42:12 +01:00
.. conf_master :: syndic_failover
2016-05-16 14:51:13 -06:00
`` syndic_failover ``
-------------------
.. versionadded :: 2016.3.0
Default: `` random ``
The behaviour of the multi-syndic when connection to a master of masters failed.
Can specify `` random `` (default) or `` ordered `` . If set to `` random `` , masters
will be iterated in random order. If `` ordered `` is specified, the configured
order will be used.
.. code-block :: yaml
syndic_failover: random
2016-12-15 10:40:01 -07:00
.. conf_master :: syndic_wait
`` syndic_wait ``
---------------
Default: `` 5 ``
The number of seconds for the salt client to wait for additional syndics to
check in with their lists of expected minions before giving up.
.. code-block :: yaml
syndic_wait: 5
2016-12-10 01:23:06 +01:00
.. conf_master :: syndic_forward_all_events
`` syndic_forward_all_events ``
2017-06-14 11:36:06 -06:00
-----------------------------
2016-12-10 01:23:06 +01:00
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2016-12-10 01:23:06 +01:00
Default: `` False ``
Option on multi-syndic or single when connected to multiple masters to be able to
send events to all connected masters.
.. code-block :: yaml
syndic_forward_all_events: False
2014-01-12 05:23:09 +00:00
2017-06-14 15:15:46 -06:00
.. _peer-publish-settings:
2012-01-13 12:35:56 -07:00
Peer Publish Settings
2013-08-07 23:50:51 +01:00
=====================
2012-01-13 12:35:56 -07:00
Salt minions can send commands to other minions, but only if the minion is
allowed to. By default "Peer Publication" is disabled, and when enabled it
is enabled for specific minions and specific commands. This allows secure
compartmentalization of commands based on individual minions.
.. conf_master :: peer
`` peer ``
--------
Default: `` {} ``
The configuration uses regular expressions to match minions and then a list
2012-03-08 21:05:52 -07:00
of regular expressions to match functions. The following will allow the
2012-01-13 12:35:56 -07:00
minion authenticated as foo.example.com to execute functions from the test
2014-10-09 10:14:37 -06:00
and pkg modules.
2012-01-13 12:35:56 -07:00
.. code-block :: yaml
peer:
foo.example.com:
- test.*
- pkg.*
This will allow all minions to execute all commands:
.. code-block :: yaml
peer:
.*:
- .*
2012-03-08 21:05:52 -07:00
This is not recommended, since it would allow anyone who gets root on any
2012-01-13 12:35:56 -07:00
single minion to instantly have root on all of the minions!
2013-11-06 11:03:31 -07:00
By adding an additional layer you can limit the target hosts in addition to the
accessible commands:
.. code-block :: yaml
peer:
foo.example.com:
'db*':
- test.*
- pkg.*
2012-06-02 21:05:17 -06:00
.. conf_master :: peer_run
`` peer_run ``
------------
Default: `` {} ``
The peer_run option is used to open up runners on the master to access from the
minions. The peer_run configuration matches the format of the peer
configuration.
The following example would allow foo.example.com to execute the manage.up
runner:
.. code-block :: yaml
peer_run:
foo.example.com:
- manage.up
2013-08-07 23:50:51 +01:00
2013-07-25 08:07:18 +01:00
.. _master-logging-settings:
2011-05-30 22:16:25 -06:00
Master Logging Settings
2013-08-07 23:50:51 +01:00
=======================
2011-05-30 22:16:25 -06:00
.. conf_master :: log_file
`` log_file ``
------------
2013-08-07 23:50:51 +01:00
Default: `` /var/log/salt/master ``
2011-05-30 22:16:25 -06:00
2013-10-03 15:41:37 -06:00
The master log can be sent to a regular file, local path name, or network
2013-12-13 17:33:32 -07:00
location. See also :conf_log:`log_file` .
2013-08-07 23:50:51 +01:00
Examples:
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
2013-01-10 16:51:44 -08:00
log_file: /var/log/salt/master
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
2013-01-10 16:51:44 -08:00
log_file: file:///dev/log
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
2013-01-10 16:51:44 -08:00
log_file: udp://loghost:10514
2011-05-30 22:16:25 -06:00
2013-08-07 23:50:51 +01:00
2011-05-30 22:16:25 -06:00
.. conf_master :: log_level
`` log_level ``
-------------
Default: `` warning ``
2013-12-13 17:33:32 -07:00
The level of messages to send to the console. See also :conf_log:`log_level` .
2011-05-30 22:16:25 -06:00
2011-06-22 20:41:10 -06:00
.. code-block :: yaml
2011-05-30 22:16:25 -06:00
log_level: warning
2013-01-09 23:45:11 -08:00
.. conf_master :: log_level_logfile
`` log_level_logfile ``
---------------------
Default: `` warning ``
2013-10-03 15:41:37 -06:00
The level of messages to send to the log file. See also
2015-07-21 16:42:39 -05:00
:conf_log:`log_level_logfile` . When it is not set explicitly
2015-02-12 19:47:59 +01:00
it will inherit the level set by :conf_log:`log_level` option.
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
log_level_logfile: warning
.. conf_master :: log_datefmt
`` log_datefmt ``
---------------
Default: `` %H:%M:%S ``
2013-10-03 15:41:37 -06:00
The date and time format used in console log messages. See also
2013-12-13 17:33:32 -07:00
:conf_log:`log_datefmt` .
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
log_datefmt: '%H:%M:%S'
.. conf_master :: log_datefmt_logfile
`` log_datefmt_logfile ``
-----------------------
Default: `` %Y-%m-%d %H:%M:%S ``
2013-10-03 15:41:37 -06:00
The date and time format used in log file messages. See also
2013-12-13 17:33:32 -07:00
:conf_log:`log_datefmt_logfile` .
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
log_datefmt_logfile: '%Y-%m-%d %H:%M:%S'
.. conf_master :: log_fmt_console
`` log_fmt_console ``
-------------------
Default: `` [%(levelname)-8s] %(message)s ``
2013-10-03 15:41:37 -06:00
The format of the console logging messages. See also
2013-12-13 17:33:32 -07:00
:conf_log:`log_fmt_console` .
2013-01-09 23:45:11 -08:00
2015-07-28 15:54:10 -06:00
.. note ::
Log colors are enabled in `` log_fmt_console `` rather than the
:conf_master:`color` config since the logging system is loaded before the
master config.
Console log colors are specified by these additional formatters:
%(colorlevel)s
%(colorname)s
%(colorprocess)s
%(colormsg)s
Since it is desirable to include the surrounding brackets, '[' and ']', in
the coloring of the messages, these color formatters also include padding
as well. Color LogRecord attributes are only available for console
logging.
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
2015-07-28 15:54:10 -06:00
log_fmt_console: '%(colorlevel)s %(colormsg)s'
2013-01-09 23:45:11 -08:00
log_fmt_console: '[%(levelname)-8s] %(message)s'
.. conf_master :: log_fmt_logfile
`` log_fmt_logfile ``
-------------------
2016-06-02 17:38:31 +02:00
Default: `` %(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s ``
2013-01-09 23:45:11 -08:00
2013-10-03 15:41:37 -06:00
The format of the log file logging messages. See also
2013-12-13 17:33:32 -07:00
:conf_log:`log_fmt_logfile` .
2013-01-09 23:45:11 -08:00
.. code-block :: yaml
2016-06-02 17:38:31 +02:00
log_fmt_logfile: '%(asctime)s,%(msecs)03d [%(name)-17s][%(levelname)-8s] %(message)s'
2013-01-09 23:45:11 -08:00
2011-05-30 22:16:25 -06:00
.. conf_master :: log_granular_levels
`` log_granular_levels ``
-----------------------
Default: `` {} ``
2013-10-03 15:41:37 -06:00
This can be used to control logging levels more specifically. See also
2013-12-13 17:33:32 -07:00
:conf_log:`log_granular_levels` .
2013-08-07 23:50:51 +01:00
2017-06-14 15:15:46 -06:00
2019-03-22 11:26:01 -06:00
.. conf_master :: log_rotate_max_bytes
`` log_rotate_max_bytes ``
------------------------
Default: `` 0 ``
The maximum number of bytes a single log file may contain before it is rotated.
A value of 0 disables this feature. Currently only supported on Windows. On
other platforms, use an external tool such as 'logrotate' to manage log files.
:conf_log:`log_rotate_max_bytes`
.. conf_master :: log_rotate_backup_count
`` log_rotate_backup_count ``
---------------------------
Default: `` 0 ``
The number of backup files to keep when rotating log files. Only used if
:conf_master:`log_rotate_max_bytes` is greater than 0. Currently only supported
on Windows. On other platforms, use an external tool such as 'logrotate' to
manage log files.
:conf_log:`log_rotate_backup_count`
2017-06-14 15:15:46 -06:00
.. _node-groups:
2014-01-12 05:23:09 +00:00
Node Groups
===========
.. conf_master :: nodegroups
2018-11-29 09:00:45 -05:00
`` nodegroups ``
--------------
2014-01-12 05:23:09 +00:00
Default: `` {} ``
Node groups allow for logical groupings of minion nodes.
A group consists of a group name and a compound target.
.. code-block :: yaml
nodegroups:
group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
group2: 'G@os:Debian and foo.domain.com'
2015-04-09 01:43:18 -06:00
group3: 'G@os:Debian and N@group1'
2016-02-04 13:58:41 +02:00
group4:
2017-06-15 09:49:13 -06:00
- 'G@foo:bar'
- 'or'
- 'G@foo:baz'
2015-04-09 01:43:18 -06:00
More information on using nodegroups can be found :ref: `here <targeting-nodegroups>` .
2014-01-12 05:23:09 +00:00
2017-06-14 15:15:46 -06:00
.. _range-cluster-settings:
2014-01-12 05:23:09 +00:00
Range Cluster Settings
======================
.. conf_master :: range_server
`` range_server ``
----------------
2016-03-31 13:50:51 -06:00
Default: `` 'range:80' ``
2014-01-12 05:23:09 +00:00
The range server (and optional port) that serves your cluster information
2014-08-20 11:54:29 -06:00
https://github.com/ytoolshed/range/wiki/%22yamlfile%22-module-file-spec
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2017-06-14 15:15:46 -06:00
range_server: range:80
2014-01-12 05:23:09 +00:00
2011-06-24 22:38:27 -06:00
2017-06-14 15:15:46 -06:00
.. _include-configuration:
2013-08-07 23:50:51 +01:00
Include Configuration
=====================
2012-08-24 16:14:21 +01:00
2018-08-02 11:19:22 -05:00
Configuration can be loaded from multiple files. The order in which this is
done is:
1. The master config file itself
2. The files matching the glob in :conf_master:`default_include`
3. The files matching the glob in :conf_master:`include` (if defined)
Each successive step overrides any values defined in the previous steps.
Therefore, any config options defined in one of the
:conf_master:`default_include` files would override the same value in the
master config file, and any options defined in :conf_master:`include` would
override both.
2013-01-09 23:45:11 -08:00
.. conf_master :: default_include
2012-08-24 16:14:21 +01:00
`` default_include ``
-------------------
Default: `` master.d/*.conf ``
2013-02-21 16:15:27 +08:00
The master can include configuration from other files. Per default the
2013-08-07 23:50:51 +01:00
master will automatically include all config files from `` master.d/*.conf ``
where `` master.d `` is relative to the directory of the master configuration
2012-08-24 16:14:21 +01:00
file.
2013-08-07 23:50:51 +01:00
2016-05-13 10:14:57 -06:00
.. note ::
Salt creates files in the `` master.d `` directory for its own use. These
files are prefixed with an underscore. A common example of this is the
`` _schedule.conf `` file.
2013-08-07 23:50:51 +01:00
.. conf_master :: include
`` include ``
-----------
Default: `` not defined ``
The master can include configuration from other files. To enable this,
pass a list of paths to this option. The paths can be either relative or
absolute; if relative, they are considered to be relative to the directory
the main minion configuration file lives in. Paths can make use of
shell-style globbing. If no files are matched by a path passed to this
option then the master will log a warning message.
.. code-block :: yaml
# Include files from a master.d directory in the same
# directory as the master config file
2013-10-03 15:41:37 -06:00
include: master.d/*
2013-08-07 23:50:51 +01:00
# Include a single extra file into the configuration
include: /etc/roles/webserver
# Include several files and the master.d directory
include:
- extra_config
- master.d/*
- /etc/roles/webserver
2017-06-14 15:15:46 -06:00
2017-07-14 17:26:02 -06:00
Keepalive Settings
==================
.. conf_master :: tcp_keepalive
`` tcp_keepalive ``
-----------------
Default: `` True ``
The tcp keepalive interval to set on TCP ports. This setting can be used to tune Salt
connectivity issues in messy network environments with misbehaving firewalls.
.. code-block :: yaml
tcp_keepalive: True
.. conf_master :: tcp_keepalive_cnt
`` tcp_keepalive_cnt ``
---------------------
Default: `` -1 ``
Sets the ZeroMQ TCP keepalive count. May be used to tune issues with minion disconnects.
.. code-block :: yaml
tcp_keepalive_cnt: -1
.. conf_master :: tcp_keepalive_idle
`` tcp_keepalive_idle ``
----------------------
Default: `` 300 ``
Sets ZeroMQ TCP keepalive idle. May be used to tune issues with minion disconnects.
.. code-block :: yaml
tcp_keepalive_idle: 300
.. conf_master :: tcp_keepalive_intvl
`` tcp_keepalive_intvl ``
-----------------------
Default: `` -1 ``
Sets ZeroMQ TCP keepalive interval. May be used to tune issues with minion disconnects.
.. code-block :: yaml
tcp_keepalive_intvl': -1
2015-08-21 02:34:20 -05:00
.. _winrepo-master-config-opts:
2014-01-12 05:23:09 +00:00
Windows Software Repo Settings
2014-03-05 22:21:11 +01:00
==============================
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
.. conf_master :: winrepo_provider
`` winrepo_provider ``
--------------------
.. versionadded :: 2015.8.0
Specify the provider to be used for winrepo. Must be either `` pygit2 `` or
`` gitpython `` . If unset, then both will be tried in that same order, and the
first one with a compatible version installed will be the provider that is
used.
.. code-block :: yaml
winrepo_provider: gitpython
.. conf_master :: winrepo_dir
2014-01-12 05:23:09 +00:00
.. conf_master :: win_repo
2015-08-09 02:53:36 -05:00
`` winrepo_dir ``
---------------
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
.. versionchanged :: 2015.8.0
2016-07-14 14:55:41 +03:00
2015-10-05 14:22:59 -06:00
Renamed from `` win_repo `` to `` winrepo_dir `` .
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
Default: `` /srv/salt/win/repo ``
2014-01-12 05:23:09 +00:00
2015-10-05 14:22:59 -06:00
Location on the master where the :conf_master:`winrepo_remotes` are checked out
for pre-2015.8.0 minions. 2015.8.0 and later minions use
:conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2015-08-09 02:53:36 -05:00
winrepo_dir: /srv/salt/win/repo
2014-01-12 05:23:09 +00:00
2015-10-05 14:22:59 -06:00
.. conf_master :: winrepo_dir_ng
`` winrepo_dir_ng ``
2015-12-21 13:24:27 +01:00
------------------
2015-10-05 14:22:59 -06:00
.. versionadded :: 2015.8.0
A new :ref: `ng <windows-package-manager>` repo was added.
Default: `` /srv/salt/win/repo-ng ``
Location on the master where the :conf_master:`winrepo_remotes_ng` are checked
out for 2015.8.0 and later minions.
.. code-block :: yaml
2016-03-04 22:19:25 +00:00
winrepo_dir_ng: /srv/salt/win/repo-ng
2015-10-05 14:22:59 -06:00
2015-08-09 02:53:36 -05:00
.. conf_master :: winrepo_cachefile
2014-01-12 05:23:09 +00:00
.. conf_master :: win_repo_mastercachefile
2015-08-09 02:53:36 -05:00
`` winrepo_cachefile ``
---------------------
.. versionchanged :: 2015.8.0
2016-07-14 14:55:41 +03:00
2015-08-09 02:53:36 -05:00
Renamed from `` win_repo_mastercachefile `` to `` winrepo_cachefile ``
2014-01-12 05:23:09 +00:00
2015-10-05 14:22:59 -06:00
.. note ::
2016-07-14 14:55:41 +03:00
2015-10-05 14:22:59 -06:00
2015.8.0 and later minions do not use this setting since the cachefile
2018-08-29 15:36:58 -06:00
is now generated by the minion.
2015-10-05 14:22:59 -06:00
2015-08-09 02:53:36 -05:00
Default: `` winrepo.p ``
Path relative to :conf_master:`winrepo_dir` where the winrepo cache should be
created.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2015-08-09 02:53:36 -05:00
winrepo_cachefile: winrepo.p
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
.. conf_master :: winrepo_remotes
2014-01-12 05:23:09 +00:00
.. conf_master :: win_gitrepos
2015-08-09 02:53:36 -05:00
`` winrepo_remotes ``
-------------------
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
.. versionchanged :: 2015.8.0
2016-07-14 14:55:41 +03:00
2015-10-05 14:22:59 -06:00
Renamed from `` win_gitrepos `` to `` winrepo_remotes `` .
2014-01-12 05:23:09 +00:00
2015-08-09 02:53:36 -05:00
Default: `` ['https://github.com/saltstack/salt-winrepo.git'] ``
2015-10-05 14:22:59 -06:00
List of git repositories to checkout and include in the winrepo for
pre-2015.8.0 minions. 2015.8.0 and later minions use
:conf_master:`winrepo_remotes_ng <winrepo_remotes_ng>` instead.
2014-01-12 05:23:09 +00:00
.. code-block :: yaml
2015-08-09 02:53:36 -05:00
winrepo_remotes:
- https://github.com/saltstack/salt-winrepo.git
2015-06-05 17:32:35 -06:00
2015-08-09 02:53:36 -05:00
To specify a specific revision of the repository, prepend a commit ID to the
2015-10-05 14:22:59 -06:00
URL of the repository:
2015-06-05 17:32:35 -06:00
.. code-block :: yaml
2015-08-09 02:53:36 -05:00
winrepo_remotes:
2015-06-05 17:32:35 -06:00
- '<commit_id> https://github.com/saltstack/salt-winrepo.git'
2015-08-09 02:53:36 -05:00
Replace `` <commit_id> `` with the SHA1 hash of a commit ID. Specifying a commit
ID is useful in that it allows one to revert back to a previous version in the
event that an error is introduced in the latest revision of the repo.
2015-10-05 14:22:59 -06:00
.. conf_master :: winrepo_remotes_ng
`` winrepo_remotes_ng ``
2015-12-21 13:24:27 +01:00
----------------------
2015-10-05 14:22:59 -06:00
.. versionadded :: 2015.8.0
A new :ref: `ng <windows-package-manager>` repo was added.
Default: `` ['https://github.com/saltstack/salt-winrepo-ng.git'] ``
List of git repositories to checkout and include in the winrepo for
2015.8.0 and later minions.
.. code-block :: yaml
winrepo_remotes_ng:
- https://github.com/saltstack/salt-winrepo-ng.git
To specify a specific revision of the repository, prepend a commit ID to the
URL of the repository:
.. code-block :: yaml
2017-07-14 17:26:02 -06:00
winrepo_remotes_ng:
2015-10-05 14:22:59 -06:00
- '<commit_id> https://github.com/saltstack/salt-winrepo-ng.git'
Replace `` <commit_id> `` with the SHA1 hash of a commit ID. Specifying a commit
ID is useful in that it allows one to revert back to a previous version in the
event that an error is introduced in the latest revision of the repo.
2015-08-09 02:53:36 -05:00
.. conf_master :: winrepo_branch
`` winrepo_branch ``
------------------
.. versionadded :: 2015.8.0
Default: `` master ``
If the branch is omitted from a winrepo remote, then this branch will be
used instead. For example, in the configuration below, the first two remotes
would use the `` winrepo `` branch/tag, while the third would use the `` foo ``
branch/tag.
.. code-block :: yaml
winrepo_branch: winrepo
2018-02-28 13:07:11 -06:00
winrepo_remotes:
- https://mygitserver/winrepo1.git
- https://mygitserver/winrepo2.git:
- foo https://mygitserver/winrepo3.git
2015-08-09 02:53:36 -05:00
.. conf_master :: winrepo_ssl_verify
`` winrepo_ssl_verify ``
----------------------
.. versionadded :: 2015.8.0
2016-10-27 15:26:30 -06:00
.. versionchanged :: 2016.11.0
2015-08-09 02:53:36 -05:00
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
Default: `` False ``
2015-08-09 02:53:36 -05:00
Specifies whether or not to ignore SSL certificate errors when contacting the
[develop] Merge forward from 2016.3 to develop (#32494)
* fix sorting by latest version when called with an attribute
* remove reference to master_alive_check
* Fixes saltstack/salt#28262
* Resolve memory leak in authentication
* outputter virt_list does not exist anymore
* Update proxmox documentation
* Fix documentation on boto_asg and boto_elb modules and states
* modules.win_timezone: don't list all zones in debug log
* Correcty index glusterfs bricks
Fixes issue #32311
* Cleaner deprecation process with decorators
* Add deprecation decorator scaffold
* Capture type error and unhandled exceptions while function calls
* Aware of the current and future version of deprecation
* Implement initially is_deprecated decorator
* Add an alias for the capitalization
* Fix capitalization easier way
* Remove an extra line
* Add successor name to the deprecation decorator.
* Granulate logging and error messages.
* Implement function swapper
* Raise later the caught exception
* Clarify exception message
* Save function original name
* Remove an extra line
* Hide an alternative hidden function name in the error message, preserving the error itself
* Rename variable as private
* Add a method to detect if a function is using its previous version
* Message to the log and/or raise an exception accordingly to the status of used function
* Log an error along with the exception
* Add internal method documentation
* Add documentation and usage process for decorator "is_deprecated"
* Add documentation and process usage for the decorator "with_deprecated"
* Hide private method name
* Fix PEP8, re-word the error message
* Deprecate basic uptime function
* Add initial decorator unit test
* Rename old/new functions, mock versions
* Move frequent data to the test setup
* Add logging on EOL exception
* Rename and document high to low version test on is_deprecated
* Implement a test on low to high version of is_deprecated decorator
* Add a correction to the test description
* Remove a dead code
* Implement a test for high to low version on is_deprecated, using with_successor param
* Correct typso adn mistaeks
* Implement high to low version with successor param on is_deprecated
* Setup a virtual name for the module
* Implement test for with_deprecated should raise an exception if same deprecated function not found
* Implement test for with_deprecated an old function is picked up if configured
* Correct test description purpose
* Implement test with_deprecated when no deprecation is requested
* Add logging test to the configured deprecation request
* Add logging testing when deprecated version wasn't requested
* Implement test EOL for with_deprecated decorator
* Correct test explanation
* Rename the test
* Implement with_deprecated no EOL, deprecated other function name
* Implement with_deprecated, deprecated other function name, EOL reached
* Add test description for the with_deprecated + with_name + EOL
* Fix confusing test names
* Add logging test to the is_deprecated decorator when function as not found.
* Add more test point to each test, remove empty lines
* Bugfix: at certain conditions a wrong alias name is reported to the log
* Fix a typo in a comment
* Add test for the logging
* Disable a pylint: None will _never_ be raised
* Fix test for the deprecated "status.uptime" version
* Bugfix: Do not yank raised exceptions
* Remove unnecessary decorator
* Add test for the new uptime
* Add test for the new uptime fails when /proc/uptime does not exists
* Rename old test case
* Skip test for the UTC time, unless freeze time is used.
* Fix pylint
* Fix documentation
* Bugfix: proxy-pass the docstring of the decorated function
* Lint fix
* Fixes saltstack/salt#28262 for 2015.5 branch
* Update master config docs
* Improve git_pillar documentation/logging
* Add note about different behavior of top file in git_pillar
* Make log entry for a missing pillar SLS file more accurate for git_pillar
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* FreeBSD supports packages in format java/openjdk7 so the prior commit broke that functionality. Check freebsd/pkg#1409 for more info.
* Update glusterfs_test to be inline with #32312
* Fix salt-cloud paralell provisioning
Closes #31632
* Ignore Raspbian in service.py __virtual__ (#32421)
* Ignore Raspbian in service.py __virtual__
This prevents more than one execution module from trying to load as the
service virtual module.
Refs: #32413
* pack __salt__ before loading provider overrides
We can (and should) pack here since we're just packing a reference to the
object. __salt__ needs to be available when we're loading our provider
overrides
* Fix broken __salt__ dict in provider override
Using ret.items() here sets ``__salt__`` to its items (tuple containing
function name and reference), breaking usage of ``__salt__`` inside
overridden functions.
* Merge #32293 with test fixes (#32418)
* Fix issue #11497
* Remove check for working directory presence in tests
* Fix Domainname introspection
Default value needs to be extracted from the container itself,
because dockerd set Domainname value when network_mode=host.
* Add pgjsonb_queue to queue doc index
* Pylint fixes
* Pass parser options into batch mode
Resolves #31738
* Changed the target file in file.symlink test (#32443)
* Argument name in docs should match actual arg name (#32445)
Fixes #31851
* tests.integration: bypass MacOS TMPDIR, gettempdir (#32447)
Updates 0edd532, 8f558a5.
When logging in as root over `ssh root@host`, `$TMPDIR` and
`tempfile.gettempdir()` are both set to a variation of:
```
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/
```
When logging in as root over `sudo -i`, `$TMPDIR` is unset and
`tempfile.gettempdir()` is set to `/tmp`.
My guess is that the second case is an unintended or uncorrected omision
by Apple as they have introduced the longer, randomized temp path in a
recent version of MacOS.
* Issue #28706: Fix state user.present behavior. (#32448)
- As mentionned in issue #28706, state user.present no longer remove
user from groups if the keyword 'groups' with empty value '[]' is not
explicitly set, salt will assume current groups are still wanted.
* tests.integration: fix 4230c8a
* Move the tables of virtual modules to individual documentation pages
* Add new doc pages to toctree
* Add external ref to windows package manager docs
* Improve docstrings
* Add documentation on virtual module provider overrides to the module docs
* Clarify the scope of the provider param in states.
* Add link to provider override docs to all package providers
* Add link to provider override docs to all service providers
* Add link to provider override docs to all user providers
* dd link to provider override docs to all shadow providers
* Add link to provider override docs to all group providers
* Backport 31164 and 31364 (#32474)
* Don't send REQ while another one is waiting for response.
The message has to be removed from the queue the only *after* it's
already processed to don't confuse send() functionality that expects
empty queue means: there's no active sendings.
* Fixed zeromq ReqMessageClient destroy
* Add link to provider override docs to opkg.py
This is a companion to https://github.com/saltstack/salt/pull/32458, but
this module was not added until the 2016.3 branch, so the documentation
is being updated there for this module.
* Add documentation for some master/minion configs (#32454)
Refs #32400
Adds docs for:
- cli_summary
- event_return_queue
- event_return_whitelist
- event_return_blacklist
- file_recv_max_size
- fileserver_followsymlinks
- fileserver_ignoresymlinks
- fileserver_limit_traversal
* Automatically detect correct MySQL password column for 5.7 and fix setting passwords (#32440)
* Automatically detect MySQL password column
* Fix changing password in MySQL 5.7
* Fix lint test
* Fix unit tests (?)
They will still fail if "authentication_string" is legitimately the right column name, but I don't know what to do about that.
* Additional unit test fix
* Only unsub if we have a jid
Closes #32479
2016-04-11 17:07:15 -06:00
remote repository. The `` False `` setting is useful if you're using a
2015-08-09 02:53:36 -05:00
git repo that uses a self-signed certificate. However, keep in mind that
setting this to anything other `` True `` is a considered insecure, and using an
SSH-based transport (if available) may be a better option.
2016-10-27 15:26:30 -06:00
In the 2016.11.0 release, the default config value changed from `` False `` to
2016-04-06 15:34:02 -06:00
`` True `` .
2015-08-09 02:53:36 -05:00
.. code-block :: yaml
winrepo_ssl_verify: True
Winrepo Authentication Options
------------------------------
These parameters only currently apply to the `` pygit2 ``
:conf_master:`winrepo_provider` . Authentication works the same as it does in
gitfs, as outlined in the :ref: `GitFS Walkthrough <gitfs-authentication>` ,
though the global configuration options are named differently to reflect that
they are for winrepo instead of gitfs.
.. conf_master :: winrepo_user
`` winrepo_user ``
***** ***** ***** *
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`winrepo_password` , is used to authenticate to HTTPS
remotes.
.. code-block :: yaml
winrepo_user: git
.. conf_master :: winrepo_password
`` winrepo_password ``
***** ***** ***** *****
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`winrepo_user` , is used to authenticate to HTTPS
remotes. This parameter is not required if the repository does not use
authentication.
.. code-block :: yaml
winrepo_password: mypassword
.. conf_master :: winrepo_insecure_auth
`` winrepo_insecure_auth ``
***** ***** ***** ***** *****
.. versionadded :: 2015.8.0
Default: `` False ``
By default, Salt will not authenticate to an HTTP (non-HTTPS) remote. This
parameter enables authentication over HTTP. **Enable this at your own risk.**
.. code-block :: yaml
winrepo_insecure_auth: True
.. conf_master :: winrepo_pubkey
`` winrepo_pubkey ``
***** ***** ***** ***
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`winrepo_privkey` (and optionally
:conf_master:`winrepo_passphrase` ), is used to authenticate to SSH remotes.
.. code-block :: yaml
winrepo_pubkey: /path/to/key.pub
.. conf_master :: winrepo_privkey
`` winrepo_privkey ``
***** ***** ***** *** *
.. versionadded :: 2015.8.0
Default: `` '' ``
Along with :conf_master:`winrepo_pubkey` (and optionally
:conf_master:`winrepo_passphrase` ), is used to authenticate to SSH remotes.
.. code-block :: yaml
winrepo_privkey: /path/to/key
.. conf_master :: winrepo_passphrase
`` winrepo_passphrase ``
***** ***** ***** ***** **
.. versionadded :: 2015.8.0
Default: `` '' ``
This parameter is optional, required only when the SSH key being used to
authenticate is protected by a passphrase.
.. code-block :: yaml
winrepo_passphrase: mypassphrase
2017-02-09 10:50:45 -06:00
.. conf_master :: winrepo_refspecs
`` winrepo_refspecs ``
2020-06-23 18:56:42 -06:00
***** ***** ***** *****
2017-02-09 10:50:45 -06:00
2017-06-14 11:36:06 -06:00
.. versionadded :: 2017.7.0
2017-02-09 10:50:45 -06:00
Default: `` ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] ``
When fetching from remote repositories, by default Salt will fetch branches and
tags. This parameter can be used to override the default and specify
alternate refspecs to be fetched. This parameter works similarly to its
2018-05-28 16:13:12 -05:00
:ref: `GitFS counterpart <gitfs-custom-refspecs>` , in that it can be
2017-02-09 10:50:45 -06:00
configured both globally and for individual remotes.
.. code-block :: yaml
winrepo_refspecs:
- '+refs/heads/*:refs/remotes/origin/* '
- '+refs/tags/*:refs/tags/* '
- '+refs/pull/*/head:refs/remotes/origin/pr/* '
- '+refs/pull/*/merge:refs/remotes/origin/merge/* '
2017-06-14 15:15:46 -06:00
.. _configure-master-on-windows:
Configure Master on Windows
===========================
The master on Windows requires no additional configuration. You can modify the
master configuration by creating/editing the master config file located at
`` c:\salt\conf\master `` . The same configuration options available on Linux are
available in Windows, as long as they apply. For example, SSH options wouldn't
apply in Windows. The main differences are the file paths. If you are familiar
with common salt paths, the following table may be useful:
============= ========= =================
linux Paths Windows Paths
============= ========= =================
`` /etc/salt `` `` <---> `` `` c:\salt\conf ``
`` / `` `` <---> `` `` c:\salt ``
============= ========= =================
So, for example, the master config file in Linux is `` /etc/salt/master `` . In
Windows the master config file is `` c:\salt\conf\master `` . The Linux path
`` /etc/salt `` becomes `` c:\salt\conf `` in Windows.
Common File Locations
---------------------
====================================== =============================================
Linux Paths Windows Paths
====================================== =============================================
`` conf_file: /etc/salt/master `` `` conf_file: c:\salt\conf\master ``
`` log_file: /var/log/salt/master `` `` log_file: c:\salt\var\log\salt\master ``
`` pidfile: /var/run/salt-master.pid `` `` pidfile: c:\salt\var\run\salt-master.pid ``
====================================== =============================================
Common Directories
------------------
====================================================== ============================================
Linux Paths Windows Paths
====================================================== ============================================
`` cachedir: /var/cache/salt/master `` `` cachedir: c:\salt\var\cache\salt\master ``
`` extension_modules: /var/cache/salt/master/extmods `` `` c:\salt\var\cache\salt\master\extmods ``
`` pki_dir: /etc/salt/pki/master `` `` pki_dir: c:\salt\conf\pki\master ``
`` root_dir: / `` `` root_dir: c:\salt ``
`` sock_dir: /var/run/salt/master `` `` sock_dir: c:\salt\var\run\salt\master ``
====================================================== ============================================
Roots
-----
**file_roots**
================== =========================
Linux Paths Windows Paths
================== =========================
`` /srv/salt `` `` c:\salt\srv\salt ``
`` /srv/spm/salt `` `` c:\salt\srv\spm\salt ``
================== =========================
**pillar_roots**
==================== ===========================
Linux Paths Windows Paths
==================== ===========================
`` /srv/pillar `` `` c:\salt\srv\pillar ``
`` /srv/spm/pillar `` `` c:\salt\srv\spm\pillar ``
==================== ===========================
Win Repo Settings
-----------------
========================================== =================================================
Linux Paths Windows Paths
========================================== =================================================
`` winrepo_dir: /srv/salt/win/repo `` `` winrepo_dir: c:\salt\srv\salt\win\repo ``
`` winrepo_dir_ng: /srv/salt/win/repo-ng `` `` winrepo_dir_ng: c:\salt\srv\salt\win\repo-ng ``
========================================== =================================================