mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2018.3' into fix_cmd_run_all_bg_oxygen
This commit is contained in:
commit
3ecf5018d0
251 changed files with 39048 additions and 7404 deletions
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-API" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-API" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-api \- salt-api Command
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CALL" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-CALL" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-call \- salt-call Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CLOUD" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-CLOUD" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-cloud \- Salt Cloud Command
|
||||
.
|
||||
|
@ -197,7 +197,7 @@ New in version 2014.7.0.
|
|||
|
||||
.sp
|
||||
Display a list of configured profiles. Pass in a cloud provider to view
|
||||
the provider\(aqs associated profiles, such as \fBdigital_ocean\fP, or pass in
|
||||
the provider\(aqs associated profiles, such as \fBdigitalocean\fP, or pass in
|
||||
\fBall\fP to list all the configured profiles.
|
||||
.UNINDENT
|
||||
.SS Cloud Providers Listings
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-CP" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-CP" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-cp \- salt-cp Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-KEY" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-KEY" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-key \- salt-key Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-MASTER" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-MASTER" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-master \- salt-master Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-MINION" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-MINION" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-minion \- salt-minion Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-PROXY" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-PROXY" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-proxy \- salt-proxy Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-RUN" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-RUN" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-run \- salt-run Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-SSH" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-SSH" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-ssh \- salt-ssh Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-SYNDIC" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-SYNDIC" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-syndic \- salt-syndic Documentation
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT-UNITY" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT-UNITY" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt-unity \- salt-unity Command
|
||||
.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SALT" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SALT" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
salt \- salt
|
||||
.
|
||||
|
@ -135,7 +135,7 @@ minions to execute on.
|
|||
.B \-a EAUTH, \-\-auth=EAUTH
|
||||
Pass in an external authentication medium to validate against. The
|
||||
credentials will be prompted for. The options are \fIauto\fP,
|
||||
\fIkeystone\fP, \fIldap\fP, \fIpam\fP, and \fIstormpath\fP\&. Can be used with the \-T
|
||||
\fIkeystone\fP, \fIldap\fP, and \fIpam\fP\&. Can be used with the \-T
|
||||
option.
|
||||
.UNINDENT
|
||||
.INDENT 0.0
|
||||
|
|
42982
doc/man/salt.7
42982
doc/man/salt.7
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
.\" Man page generated from reStructuredText.
|
||||
.
|
||||
.TH "SPM" "1" "Jan 24, 2018" "2017.7.3" "Salt"
|
||||
.TH "SPM" "1" "Feb 23, 2018" "2018.3.0" "Salt"
|
||||
.SH NAME
|
||||
spm \- Salt Package Manager Command
|
||||
.
|
||||
|
|
|
@ -1364,7 +1364,7 @@ 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.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
For security reasons the file must be readonly except for it's owner.
|
||||
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.
|
||||
|
@ -1389,7 +1389,7 @@ membership in the :conf_master:`autosign_file` and the
|
|||
``autosign_grains_dir``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``not defined``
|
||||
|
||||
|
@ -1886,7 +1886,7 @@ Set additional directories to search for runner modules.
|
|||
``utils_dirs``
|
||||
---------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``[]``
|
||||
|
||||
|
@ -2096,7 +2096,7 @@ the cloud profile or master config file, no templating will be performed.
|
|||
``jinja_env``
|
||||
-------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``{}``
|
||||
|
||||
|
@ -2132,7 +2132,7 @@ The default options are:
|
|||
``jinja_sls_env``
|
||||
-----------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``{}``
|
||||
|
||||
|
@ -2202,7 +2202,7 @@ be used if you had not set the line_statement and line_comment options:
|
|||
``jinja_trim_blocks``
|
||||
---------------------
|
||||
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
|
||||
|
||||
.. versionadded:: 2014.1.0
|
||||
|
@ -2222,7 +2222,7 @@ to the Jinja environment init variable ``trim_blocks``.
|
|||
``jinja_lstrip_blocks``
|
||||
-----------------------
|
||||
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
|
||||
|
||||
.. versionadded:: 2014.1.0
|
||||
|
@ -2631,7 +2631,7 @@ Example:
|
|||
``roots_update_interval``
|
||||
*************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -2818,7 +2818,7 @@ gitfs remotes.
|
|||
``gitfs_disable_saltenv_mapping``
|
||||
*********************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``False``
|
||||
|
||||
|
@ -2841,7 +2841,7 @@ parameters <gitfs-per-saltenv-config>`.
|
|||
``gitfs_ref_types``
|
||||
*******************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``['branch', 'tag', 'sha']``
|
||||
|
||||
|
@ -2873,7 +2873,7 @@ are mapped as saltenvs:
|
|||
***************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``gitfs_env_whitelist`` to ``gitfs_saltenv_whitelist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -2896,7 +2896,7 @@ information can be found in the :ref:`GitFS Walkthrough
|
|||
***************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``gitfs_env_blacklist`` to ``gitfs_saltenv_blacklist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -2948,7 +2948,7 @@ they were created by a different master.
|
|||
``gitfs_update_interval``
|
||||
*************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -3263,7 +3263,7 @@ bookmark should be used as the ``base`` environment.
|
|||
**************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``hgfs_env_whitelist`` to ``hgfs_saltenv_whitelist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -3293,7 +3293,7 @@ blacklist will be exposed as fileserver environments.
|
|||
**************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``hgfs_env_blacklist`` to ``hgfs_saltenv_blacklist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -3322,7 +3322,7 @@ blacklist will be exposed as fileserver environments.
|
|||
``hgfs_update_interval``
|
||||
************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -3490,7 +3490,7 @@ also be configured on a per-remote basis, see :conf_master:`here
|
|||
***************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``svnfs_env_whitelist`` to ``svnfs_saltenv_whitelist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -3520,7 +3520,7 @@ will be exposed as fileserver environments.
|
|||
***************************
|
||||
|
||||
.. versionadded:: 2014.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``svnfs_env_blacklist`` to ``svnfs_saltenv_blacklist``
|
||||
|
||||
Default: ``[]``
|
||||
|
@ -3549,7 +3549,7 @@ will be exposed as fileserver environments.
|
|||
``svnfs_update_interval``
|
||||
*************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -3655,7 +3655,7 @@ exposed.
|
|||
``minionfs_update_interval``
|
||||
****************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -3684,7 +3684,7 @@ examples.
|
|||
``azurefs_update_interval``
|
||||
***************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
@ -3706,7 +3706,7 @@ See the :mod:`s3fs documentation <salt.fileserver.s3fs>` for usage examples.
|
|||
``s3fs_update_interval``
|
||||
************************
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``60``
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ name) is set in the :conf_minion:`master` configuration setting.
|
|||
``master_tops_first``
|
||||
---------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``False``
|
||||
|
||||
|
@ -340,7 +340,7 @@ option on the Salt master.
|
|||
``source_interface_name``
|
||||
-------------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The name of the interface to use when establishing the connection to the Master.
|
||||
|
||||
|
@ -379,7 +379,7 @@ Configuration example:
|
|||
``source_address``
|
||||
------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The source IP address or the domain name to be used when connecting the Minion
|
||||
to the Master.
|
||||
|
@ -404,7 +404,7 @@ Configuration example:
|
|||
``source_ret_port``
|
||||
-------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The source port to be used when connecting the Minion to the Master ret server.
|
||||
|
||||
|
@ -427,7 +427,7 @@ Configuration example:
|
|||
``source_publish_port``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The source port to be used when connecting the Minion to the Master publish
|
||||
server.
|
||||
|
@ -1324,7 +1324,7 @@ The password used for HTTP proxy access.
|
|||
``docker.compare_container_networks``
|
||||
-------------------------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``{'static': ['Aliases', 'Links', 'IPAMConfig'], 'automatic': ['IPAddress', 'Gateway', 'GlobalIPv6Address', 'IPv6Gateway']}``
|
||||
|
||||
|
@ -1904,7 +1904,7 @@ enabled and can be disabled by changing this value to ``False``.
|
|||
``saltenv``
|
||||
-----------
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``environment`` to ``saltenv``. If ``environment`` is used,
|
||||
``saltenv`` will take its value. If both are used, ``environment`` will be
|
||||
ignored and ``saltenv`` will be used.
|
||||
|
@ -1923,7 +1923,7 @@ environments is to isolate via the top file.
|
|||
``lock_saltenv``
|
||||
----------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``False``
|
||||
|
||||
|
@ -2455,7 +2455,7 @@ minion's pki directory.
|
|||
``autosign_grains``
|
||||
-------------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``not defined``
|
||||
|
||||
|
@ -2648,7 +2648,7 @@ executed in a thread.
|
|||
``process_count_max``
|
||||
-------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Default: ``-1``
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ large groups of states easily in any requisite statement.
|
|||
require_any
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The use of ``require_any`` demands that one of the required states executes before the
|
||||
dependent state. The state containing the ``require_any`` requisite is defined as the
|
||||
|
@ -380,7 +380,7 @@ to Salt ensuring that the service is running.
|
|||
watch_any
|
||||
~~~~~~~~~
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The state containing the ``watch_any`` requisite is defined as the watching
|
||||
state. The states specified in the ``watch_any`` statement are defined as the watched
|
||||
|
@ -517,7 +517,7 @@ The ``onfail`` requisite is applied in the same way as ``require`` as ``watch``:
|
|||
onfail_any
|
||||
~~~~~~~~~~
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The ``onfail_any`` requisite allows for reactions to happen strictly as a response
|
||||
to the failure of at least one other state. This can be used in a number of ways, such as
|
||||
|
@ -616,7 +616,7 @@ if any of the watched states changes.
|
|||
onchanges_any
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The ``onchanges_any`` requisite makes a state only apply one of the required states
|
||||
generates changes, and if one of the watched state's "result" is ``True``. This can be
|
||||
|
|
|
@ -156,7 +156,7 @@ A State Module must return a dict containing the following keys/values:
|
|||
in test mode without applying the change, ``False`` can be returned.
|
||||
|
||||
- **comment:** A list of strings or a single string summarizing the result.
|
||||
Note that support for lists of strings is available as of Salt Oxygen.
|
||||
Note that support for lists of strings is available as of Salt 2018.3.0.
|
||||
Lists of strings will be joined with newlines to form the final comment;
|
||||
this is useful to allow multiple comments from subparts of a state.
|
||||
Prefer to keep line lengths short (use multiple lines as needed),
|
||||
|
|
|
@ -392,7 +392,7 @@ script, a cloud profile using ``file_map`` might look like:
|
|||
Running Pre-Flight Commands
|
||||
===========================
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
To execute specified preflight shell commands on a VM before the deploy script is
|
||||
run, use the ``preflight_cmds`` option. These must be defined as a list in a cloud
|
||||
|
@ -413,7 +413,7 @@ These commands will run in sequence **before** the bootstrap script is executed.
|
|||
Force Minion Config
|
||||
===================
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The ``force_minion_config`` option requests the bootstrap process to overwrite
|
||||
an existing minion configuration file and public/private key files.
|
||||
|
|
|
@ -89,7 +89,7 @@ to it can be verified with Salt:
|
|||
Destroy Options
|
||||
---------------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
For obvious reasons, the ``destroy`` action does not actually vaporize hardware.
|
||||
If the salt master is connected, it can tear down parts of the client machines.
|
||||
|
@ -113,7 +113,7 @@ and can execute the following options:
|
|||
Wake On LAN
|
||||
-----------
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
In addition to connecting a hardware machine to a Salt master,
|
||||
you have the option of sending a wake-on-LAN
|
||||
|
|
|
@ -286,7 +286,7 @@ Set up an initial profile at ``/etc/salt/cloud.profiles`` or
|
|||
eagerly_scrub
|
||||
Specifies whether the disk should be rewrite with zeros during thick provisioning or not.
|
||||
Default is ``eagerly_scrub: False``.
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
controller
|
||||
Specify the SCSI controller label to which this disk should be attached.
|
||||
This should be specified only when creating both the specified SCSI
|
||||
|
|
|
@ -58,7 +58,7 @@ States. GitFS is a quick and natural way to use Formulas.
|
|||
|
||||
3. Restart the Salt master.
|
||||
|
||||
Beginning with the Oxygen release, using formulas with GitFS is now much more
|
||||
Beginning with the 2018.3.0 release, using formulas with GitFS is now much more
|
||||
convenient for deployments which use many different fileserver environments
|
||||
(i.e. saltenvs). Using the :ref:`all_saltenvs <gitfs-global-remotes>`
|
||||
parameter, files from a single git branch/tag will appear in all environments.
|
||||
|
|
|
@ -834,7 +834,7 @@ Returns:
|
|||
----------
|
||||
|
||||
.. versionadded:: 2017.7.0
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
Renamed from ``str_to_num`` to ``to_num``.
|
||||
|
||||
Converts a string to its numerical value.
|
||||
|
@ -882,7 +882,7 @@ Example:
|
|||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.0
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
Renamed from ``json_decode_list`` to ``json_encode_list``. When you encode
|
||||
something you get bytes, and when you decode, you get your locale's
|
||||
encoding (usually a ``unicode`` type). This filter was incorrectly-named
|
||||
|
@ -911,7 +911,7 @@ Returns:
|
|||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.0
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
Renamed from ``json_decode_dict`` to ``json_encode_dict``. When you encode
|
||||
something you get bytes, and when you decode, you get your locale's
|
||||
encoding (usually a ``unicode`` type). This filter was incorrectly-named
|
||||
|
@ -942,7 +942,7 @@ Returns:
|
|||
---------------
|
||||
|
||||
.. versionadded:: 2017.7.0
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
Renamed from ``rand_str`` to ``random_hash`` to more accurately describe
|
||||
what the filter does. ``rand_str`` will be supported until the Neon
|
||||
release.
|
||||
|
|
|
@ -89,6 +89,6 @@ bare-bones example:
|
|||
.. note::
|
||||
If a master_tops module returns :ref:`top file <states-top>` data for a
|
||||
given minion, it will be added to the states configured in the top file. It
|
||||
will *not* replace it altogether. The Oxygen release adds additional
|
||||
will *not* replace it altogether. The 2018.3.0 release adds additional
|
||||
functionality allowing a minion to treat master_tops as the single source
|
||||
of truth, irrespective of the top file.
|
||||
|
|
|
@ -263,16 +263,16 @@ To execute with pillar data.
|
|||
Return Codes in Runner/Wheel Jobs
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
State (``salt.state``) jobs are able to report failure via the :ref:`state
|
||||
return dictionary <state-return-data>`. Remote execution (``salt.function``)
|
||||
jobs are able to report failure by setting a ``retcode`` key in the
|
||||
``__context__`` dictionary. However, runner (``salt.runner``) and wheel
|
||||
(``salt.wheel``) jobs would only report a ``False`` result when the
|
||||
runner/wheel function raised an exception. As of the Oxygen release, it is now
|
||||
possible to set a retcode in runner and wheel functions just as you can do in
|
||||
remote execution functions. Here is some example pseudocode:
|
||||
runner/wheel function raised an exception. As of the 2018.3.0 release, it is
|
||||
now possible to set a retcode in runner and wheel functions just as you can do
|
||||
in remote execution functions. Here is some example pseudocode:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
@ -332,10 +332,9 @@ Given the above setup, the orchestration will be carried out as follows:
|
|||
3. Finally, the ``ceph`` SLS target will be executed on all minions which have
|
||||
a grain called ``role`` with a value of ``storage``.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Remember, salt-run is always executed on the master.
|
||||
Remember, salt-run is *always* executed on the master.
|
||||
|
||||
.. _orchestrate-runner-parsing-results-programatically:
|
||||
|
||||
|
@ -591,11 +590,11 @@ loadable and parsable format:
|
|||
}
|
||||
|
||||
|
||||
The Oxygen release includes a couple fixes to make parsing this data easier and
|
||||
The 2018.3.0 release includes a couple fixes to make parsing this data easier and
|
||||
more accurate. The first is the ability to set a :ref:`return code
|
||||
<orchestrate-runner-return-codes-runner-wheel>` in a custom runner or wheel
|
||||
function, as noted above. The second is a change to how failures are included
|
||||
in the return data. Prior to the Oxygen release, minions that failed a
|
||||
in the return data. Prior to the 2018.3.0 release, minions that failed a
|
||||
``salt.state`` orchestration job would show up in the ``comment`` field of the
|
||||
return data, in a human-readable string that was not easily parsed. They are
|
||||
now included in the ``changes`` dictionary alongside the minions that
|
||||
|
@ -603,3 +602,32 @@ succeeded. In addition, ``salt.function`` jobs which failed because the
|
|||
:ref:`fail function <orchestrate-runner-fail-functions>` returned ``False``
|
||||
used to handle their failures in the same way ``salt.state`` jobs did, and this
|
||||
has likewise been corrected.
|
||||
|
||||
|
||||
Running States on the Master without a Minion
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The orchestrate runner can be used to execute states on the master without
|
||||
using a minion. For example, assume that ``salt://foo.sls`` contains the
|
||||
following SLS:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
/etc/foo.conf:
|
||||
file.managed:
|
||||
- source: salt://files/foo.conf
|
||||
- mode: 0600
|
||||
|
||||
In this case, running ``salt-run state.orchestrate foo`` would be the
|
||||
equivalent of running a ``state.sls foo``, but it would execute on the master
|
||||
only, and would not require a minion daemon to be running on the master.
|
||||
|
||||
This is not technically orchestration, but it can be useful in certain use
|
||||
cases.
|
||||
|
||||
Limitations
|
||||
^^^^^^^^^^^
|
||||
|
||||
Only one SLS target can be run at a time using this method, while using
|
||||
:py:func:`state.sls <salt.modules.state.sls>` allows for multiple SLS files to
|
||||
be passed in a comma-separated list.
|
||||
|
|
|
@ -157,7 +157,8 @@ will need to be restarted to pick up any changes. A corresponding utility funct
|
|||
|
||||
In addition, a salt.utils helper function called `is_proxy()` was added to make
|
||||
it easier to tell when the running minion is a proxy minion. **NOTE: This
|
||||
function was renamed to salt.utils.platform.is_proxy() for the Oxygen release**
|
||||
function was renamed to salt.utils.platform.is_proxy() for the 2018.3.0
|
||||
release**
|
||||
|
||||
New in 2015.8
|
||||
-------------
|
||||
|
|
|
@ -115,11 +115,10 @@ Name Description
|
|||
============================== ==================================================================================
|
||||
|
||||
.. note::
|
||||
The ``local`` and ``caller`` reaction types will be renamed for the Oxygen
|
||||
release. These reaction types were named after Salt's internal client
|
||||
interfaces, and are not intuitively named. Both ``local`` and ``caller``
|
||||
will continue to work in Reactor SLS files, but for the Oxygen release the
|
||||
documentation will be updated to reflect the new preferred naming.
|
||||
The ``local`` and ``caller`` reaction types will likely be renamed in a
|
||||
future release. These reaction types were named after Salt's internal
|
||||
client interfaces, and are not intuitively named. Both ``local`` and
|
||||
``caller`` will continue to work in Reactor SLS files, however.
|
||||
|
||||
Where to Put Reactor SLS Files
|
||||
==============================
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
:orphan:
|
||||
.. _release-2018-3-0:
|
||||
|
||||
====================================
|
||||
Salt Release Notes - Codename Oxygen
|
||||
====================================
|
||||
=============================================
|
||||
Salt 2018.3.0 Release Notes - Codename Oxygen
|
||||
=============================================
|
||||
|
||||
Lots of Docker Improvements
|
||||
---------------------------
|
||||
|
@ -353,7 +353,7 @@ Prior to this release, fileservers would be updated as part of a dedicated
|
|||
performed. This tied the update interval to the :conf_master:`loop_interval`
|
||||
config option, and also forced all fileservers to update at the same interval.
|
||||
|
||||
Oxygen adds the following configuration options for the various fileserver
|
||||
2018.3.0 adds the following configuration options for the various fileserver
|
||||
backends:
|
||||
|
||||
- :conf_master:`roots_update_interval`
|
||||
|
@ -1680,8 +1680,8 @@ Utils Deprecations
|
|||
|
||||
The ``salt.utils.cloud.py`` file had the following change:
|
||||
|
||||
- The ``fire_event`` function now requires a ``sock_dir`` argument. It was previously
|
||||
optional.
|
||||
- The ``fire_event`` function now requires a ``sock_dir`` argument. It was
|
||||
previously optional.
|
||||
|
||||
Other Miscellaneous Deprecations
|
||||
================================
|
||||
|
@ -1690,9 +1690,9 @@ The ``version.py`` file had the following changes:
|
|||
|
||||
- The ``rc_info`` function was removed. Please use ``pre_info`` instead.
|
||||
|
||||
Warnings for moving away from the ``env`` option were removed. ``saltenv`` should be
|
||||
used instead. The removal of these warnings does not have a behavior change. Only
|
||||
the warning text was removed.
|
||||
Warnings for moving away from the ``env`` option were removed. ``saltenv``
|
||||
should be used instead. The removal of these warnings does not have a behavior
|
||||
change. Only the warning text was removed.
|
||||
|
||||
Sentry Log Handler
|
||||
------------------
|
||||
|
@ -1705,6 +1705,6 @@ RAET transport
|
|||
--------------
|
||||
|
||||
We haven't been doing development on RAET for quite some time and decided that
|
||||
Oxygen is the time to announce the deprecation. RAET support will be removed in
|
||||
Neon. Please consider to move to ``zeromq`` or ``tcp`` transport instead of
|
||||
2018.3.0 is the time to announce the deprecation. RAET support will be removed
|
||||
in Neon. Please consider to move to ``zeromq`` or ``tcp`` transport instead of
|
||||
``raet``.
|
|
@ -20,6 +20,7 @@ Previous Releases
|
|||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
2018.3.*
|
||||
2017.7.*
|
||||
2016.11.*
|
||||
2016.3.*
|
||||
|
|
|
@ -34,7 +34,7 @@ Assigned codenames:
|
|||
- Boron: ``2016.3.0``
|
||||
- Carbon: ``2016.11.0``
|
||||
- Nitrogen: ``2017.7.0``
|
||||
- Oxygen: ``TBD``
|
||||
- Oxygen: ``2018.3.0``
|
||||
- Fluorine: ``TBD``
|
||||
|
||||
Example
|
||||
|
@ -69,10 +69,10 @@ Example arguments for `git checkout`:
|
|||
+------------+----------------------------------------------------------------------------+
|
||||
| v2016.11.1 | Tag signaling the commit that the 2016.11.1 release is based on. |
|
||||
+------------+----------------------------------------------------------------------------+
|
||||
|
||||
Further reading on `release branch and develop branch
|
||||
|
||||
Further reading on `release branch and develop branch
|
||||
<https://docs.saltstack.com/en/latest/topics/development/contributing.html#which-salt-branch>`_.
|
||||
|
||||
|
||||
Influence of the `git checkout` argument on `git describe`:
|
||||
|
||||
+------------+----------------------------+-----------------------------------------------+
|
||||
|
@ -97,4 +97,4 @@ Some details of v2016.11.1-220-g9a1550d (from `git describe` after `git checkout
|
|||
|220 | Commits on top of the most recent tag, relative to your local git fetch |
|
||||
+---------------+-------------------------------------------------------------------------+
|
||||
|gf2eb3dc | 'g' + git SHA ("abbreviated name") of the most recent commit |
|
||||
+---------------+-------------------------------------------------------------------------+
|
||||
+---------------+-------------------------------------------------------------------------+
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Slots
|
||||
=====
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. note:: This functionality is under development and could be changed in the
|
||||
future releases
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Autoaccept minions from Grains
|
||||
==============================
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
To automatically accept minions based on certain characteristics, e.g. the ``uuid``
|
||||
you can specify certain grain values on the salt master. Minions with matching grains
|
||||
|
|
|
@ -196,7 +196,7 @@ master:
|
|||
- gitfs
|
||||
|
||||
.. note::
|
||||
``git`` also works here. Prior to the Oxygen release, *only* ``git``
|
||||
``git`` also works here. Prior to the 2018.3.0 release, *only* ``git``
|
||||
would work.
|
||||
|
||||
2. Specify one or more ``git://``, ``https://``, ``file://``, or ``ssh://``
|
||||
|
@ -314,9 +314,9 @@ configured gitfs remotes):
|
|||
* :conf_master:`gitfs_privkey` (**pygit2 only**, new in 2014.7.0)
|
||||
* :conf_master:`gitfs_passphrase` (**pygit2 only**, new in 2014.7.0)
|
||||
* :conf_master:`gitfs_refspecs` (new in 2017.7.0)
|
||||
* :conf_master:`gitfs_disable_saltenv_mapping` (new in Oxygen)
|
||||
* :conf_master:`gitfs_ref_types` (new in Oxygen)
|
||||
* :conf_master:`gitfs_update_interval` (new in Oxygen)
|
||||
* :conf_master:`gitfs_disable_saltenv_mapping` (new in 2018.3.0)
|
||||
* :conf_master:`gitfs_ref_types` (new in 2018.3.0)
|
||||
* :conf_master:`gitfs_update_interval` (new in 2018.3.0)
|
||||
|
||||
.. note::
|
||||
pygit2 only supports disabling SSL verification in versions 0.23.2 and
|
||||
|
@ -370,7 +370,7 @@ tremendous amount of customization. Here's some example usage:
|
|||
``name``, ``saltenv``, and ``all_saltenvs`` parameters, which are only
|
||||
available to per-remote configurations.
|
||||
|
||||
The ``all_saltenvs`` parameter is new in the Oxygen release.
|
||||
The ``all_saltenvs`` parameter is new in the 2018.3.0 release.
|
||||
|
||||
In the example configuration above, the following is true:
|
||||
|
||||
|
@ -526,7 +526,7 @@ would only fetch branches and tags (the default).
|
|||
Global Remotes
|
||||
==============
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The ``all_saltenvs`` per-remote configuration parameter overrides the logic
|
||||
Salt uses to map branches/tags to fileserver environments (i.e. saltenvs). This
|
||||
|
@ -553,7 +553,7 @@ single branch.
|
|||
Update Intervals
|
||||
================
|
||||
|
||||
Prior to the Oxygen release, GitFS would update its fileserver backends as part
|
||||
Prior to the 2018.3.0 release, GitFS would update its fileserver backends as part
|
||||
of a dedicated "maintenance" process, in which various routine maintenance
|
||||
tasks were performed. This tied the update interval to the
|
||||
:conf_master:`loop_interval` config option, and also forced all fileservers to
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Using Apache Libcloud for declarative and procedural multi-cloud orchestration
|
||||
==============================================================================
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
@ -86,8 +86,8 @@ option on the master:
|
|||
- minionfs
|
||||
|
||||
.. note::
|
||||
``minion`` also works here. Prior to the Oxygen release, *only* ``minion``
|
||||
would work.
|
||||
``minion`` also works here. Prior to the 2018.3.0 release, *only*
|
||||
``minion`` would work.
|
||||
|
||||
Also, as described earlier, ``file_recv: True`` is needed to enable the
|
||||
master to receive files pushed from minions. As always, changes to the
|
||||
|
|
|
@ -81,7 +81,7 @@ the ``foo`` utility module with a ``__virtual__`` function.
|
|||
def bar():
|
||||
return 'baz'
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
Instantiating objects from classes declared in util modules works with
|
||||
Master side modules, such as Runners, Outputters, etc.
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ class LoadAuth(object):
|
|||
|
||||
def check_authentication(self, load, auth_type, key=None, show_username=False):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Go through various checks to see if the token/eauth/user can be authenticated.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Provide authentication using local files
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
The `file` auth module allows simple authentication via local files. Different
|
||||
filetypes are supported, including:
|
||||
|
|
|
@ -12,6 +12,8 @@ from salt.ext import six
|
|||
|
||||
# Import salt libs
|
||||
from salt.exceptions import CommandExecutionError, SaltInvocationError
|
||||
import salt.utils.stringutils
|
||||
import salt.utils.data
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
# Import third party libs
|
||||
|
@ -39,6 +41,7 @@ __defopts__ = {'auth.ldap.basedn': '',
|
|||
'auth.ldap.persontype': 'person',
|
||||
'auth.ldap.groupclass': 'posixGroup',
|
||||
'auth.ldap.activedirectory': False,
|
||||
'auth.ldap.freeipa': False,
|
||||
'auth.ldap.minion_stripdomains': [],
|
||||
}
|
||||
|
||||
|
@ -276,19 +279,24 @@ def auth(username, password):
|
|||
'''
|
||||
Simple LDAP auth
|
||||
'''
|
||||
#If bind credentials are configured, use them instead of user's
|
||||
if not HAS_LDAP:
|
||||
log.error('LDAP authentication requires python-ldap module')
|
||||
return False
|
||||
|
||||
# If bind credentials are configured, use them instead of user's
|
||||
if _config('binddn', mandatory=False) and _config('bindpw', mandatory=False):
|
||||
bind = _bind_for_search(anonymous=_config('anonymous', mandatory=False))
|
||||
else:
|
||||
bind = _bind(username, password, anonymous=_config('auth_by_group_membership_only', mandatory=False) and
|
||||
_config('anonymous', mandatory=False))
|
||||
bind = _bind(username, password,
|
||||
anonymous=_config('auth_by_group_membership_only', mandatory=False)
|
||||
and _config('anonymous', mandatory=False))
|
||||
|
||||
if bind:
|
||||
log.debug('LDAP authentication successful')
|
||||
return True
|
||||
else:
|
||||
log.error('LDAP _bind authentication FAILED')
|
||||
return False
|
||||
return bind
|
||||
|
||||
log.error('LDAP _bind authentication FAILED')
|
||||
return False
|
||||
|
||||
|
||||
def groups(username, **kwargs):
|
||||
|
@ -307,9 +315,7 @@ def groups(username, **kwargs):
|
|||
|
||||
'''
|
||||
group_list = []
|
||||
|
||||
# Perform un-authenticated bind to determine group membership
|
||||
bind = _bind_for_search(anonymous=_config('anonymous', mandatory=False))
|
||||
bind = auth(username, kwargs.get('password', None))
|
||||
|
||||
if bind:
|
||||
log.debug('ldap bind to determine group membership succeeded!')
|
||||
|
@ -321,7 +327,7 @@ def groups(username, **kwargs):
|
|||
_config('persontype'))
|
||||
user_dn_results = bind.search_s(_config('basedn'),
|
||||
ldap.SCOPE_SUBTREE,
|
||||
get_user_dn_search, ['distinguishedName'])
|
||||
get_user_dn_search, [str('distinguishedName')]) # future lint: disable=blacklisted-function
|
||||
except Exception as e:
|
||||
log.error('Exception thrown while looking up user DN in AD: %s', e)
|
||||
return group_list
|
||||
|
@ -336,13 +342,13 @@ def groups(username, **kwargs):
|
|||
search_results = bind.search_s(_config('basedn'),
|
||||
ldap.SCOPE_SUBTREE,
|
||||
ldap_search_string,
|
||||
[_config('accountattributename'), 'cn'])
|
||||
[salt.utils.stringutils.to_str(_config('accountattributename')), str('cn')]) # future lint: disable=blacklisted-function
|
||||
except Exception as e:
|
||||
log.error('Exception thrown while retrieving group membership in AD: %s', e)
|
||||
return group_list
|
||||
for _, entry in search_results:
|
||||
if 'cn' in entry:
|
||||
group_list.append(entry['cn'][0])
|
||||
group_list.append(salt.utils.stringutils.to_unicode(entry['cn'][0]))
|
||||
log.debug('User %s is a member of groups: %s', username, group_list)
|
||||
|
||||
elif _config('freeipa'):
|
||||
|
@ -352,11 +358,11 @@ def groups(username, **kwargs):
|
|||
search_results = bind.search_s(search_base,
|
||||
ldap.SCOPE_SUBTREE,
|
||||
search_string,
|
||||
[_config('accountattributename'), 'cn'])
|
||||
[salt.utils.stringutils.to_str(_config('accountattributename')), str('cn')]) # future lint: disable=blacklisted-function
|
||||
|
||||
for entry, result in search_results:
|
||||
for user in result[_config('accountattributename')]:
|
||||
if username == user.split(',')[0].split('=')[-1]:
|
||||
if username == salt.utils.stringutils.to_unicode(user).split(',')[0].split('=')[-1]:
|
||||
group_list.append(entry.split(',')[0].split('=')[-1])
|
||||
|
||||
log.debug('User %s is a member of groups: %s', username, group_list)
|
||||
|
@ -374,14 +380,16 @@ def groups(username, **kwargs):
|
|||
search_results = bind.search_s(search_base,
|
||||
ldap.SCOPE_SUBTREE,
|
||||
search_string,
|
||||
[_config('accountattributename'), 'cn', _config('groupattribute')])
|
||||
[salt.utils.stringutils.to_str(_config('accountattributename')),
|
||||
str('cn'), # future lint: disable=blacklisted-function
|
||||
salt.utils.stringutils.to_str(_config('groupattribute'))])
|
||||
for _, entry in search_results:
|
||||
if username in entry[_config('accountattributename')]:
|
||||
group_list.append(entry['cn'][0])
|
||||
if username in salt.utils.data.decode(entry[_config('accountattributename')]):
|
||||
group_list.append(salt.utils.stringutils.to_unicode(entry['cn'][0]))
|
||||
for user, entry in search_results:
|
||||
if username == user.split(',')[0].split('=')[-1]:
|
||||
for group in entry[_config('groupattribute')]:
|
||||
group_list.append(group.split(',')[0].split('=')[-1])
|
||||
if username == salt.utils.stringutils.to_unicode(user).split(',')[0].split('=')[-1]:
|
||||
for group in salt.utils.data.decode(entry[_config('groupattribute')]):
|
||||
group_list.append(salt.utils.stringutils.to_unicode(group).split(',')[0].split('=')[-1])
|
||||
log.debug('User %s is a member of groups: %s', username, group_list)
|
||||
|
||||
# Only test user auth on first call for job.
|
||||
|
@ -435,7 +443,7 @@ def __expand_ldap_entries(entries, opts=None):
|
|||
search_results = bind.search_s(search_base,
|
||||
ldap.SCOPE_SUBTREE,
|
||||
search_string,
|
||||
['cn'])
|
||||
[str('cn')]) # future lint: disable=blacklisted-function
|
||||
for ldap_match in search_results:
|
||||
try:
|
||||
minion_id = ldap_match[1]['cn'][0].lower()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Beacon to fire event when we notice a AIX user is locked due to many failed login attempts.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:depends: none
|
||||
'''
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
NAPALM functions
|
||||
================
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Watch NAPALM functions and fire events on specific triggers.
|
||||
|
||||
|
|
|
@ -57,11 +57,6 @@ from salt.exceptions import (
|
|||
# Import third party libs
|
||||
from salt.ext import six
|
||||
# pylint: disable=import-error
|
||||
try:
|
||||
import zmq
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
|
||||
# Try to import range from https://github.com/ytoolshed/range
|
||||
HAS_RANGE = False
|
||||
|
|
|
@ -60,11 +60,7 @@ try:
|
|||
HAS_WINSHELL = False
|
||||
except ImportError:
|
||||
HAS_WINSHELL = False
|
||||
try:
|
||||
import zmq
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
from salt.utils.zeromq import zmq
|
||||
|
||||
# The directory where salt thin is deployed
|
||||
DEFAULT_THIN_DIR = '/var/tmp/.%%USER%%_%%FQDNUUID%%_salt'
|
||||
|
@ -214,7 +210,7 @@ class SSH(object):
|
|||
def __init__(self, opts):
|
||||
self.__parsed_rosters = {SSH.ROSTER_UPDATE_FLAG: True}
|
||||
pull_sock = os.path.join(opts['sock_dir'], 'master_event_pull.ipc')
|
||||
if os.path.exists(pull_sock) and HAS_ZMQ:
|
||||
if os.path.exists(pull_sock) and zmq:
|
||||
self.event = salt.utils.event.get_event(
|
||||
'master',
|
||||
opts['sock_dir'],
|
||||
|
@ -444,7 +440,7 @@ class SSH(object):
|
|||
if target.get('passwd', False) or self.opts['ssh_passwd']:
|
||||
self._key_deploy_run(host, target, False)
|
||||
return ret
|
||||
if ret[host].get('stderr', '').count('Permission denied'):
|
||||
if (ret[host].get('stderr') or '').count('Permission denied'):
|
||||
target = self.targets[host]
|
||||
# permission denied, attempt to auto deploy ssh key
|
||||
print(('Permission denied for host {0}, do you want to deploy '
|
||||
|
@ -662,7 +658,9 @@ class SSH(object):
|
|||
host = next(six.iterkeys(ret))
|
||||
self.cache_job(jid, host, ret[host], fun)
|
||||
if self.event:
|
||||
_, data = next(six.iteritems(ret))
|
||||
id_, data = next(six.iteritems(ret))
|
||||
if 'id' not in data:
|
||||
data['id'] = id_
|
||||
data['jid'] = jid # make the jid in the payload the same as the jid in the tag
|
||||
self.event.fire_event(
|
||||
data,
|
||||
|
@ -755,7 +753,7 @@ class SSH(object):
|
|||
self.cache_job(jid, host, ret[host], fun)
|
||||
ret = self.key_deploy(host, ret)
|
||||
|
||||
if isinstance(ret[host], dict) and ret[host].get('stderr', '').startswith('ssh:'):
|
||||
if isinstance(ret[host], dict) and (ret[host].get('stderr') or '').startswith('ssh:'):
|
||||
ret[host] = ret[host]['stderr']
|
||||
|
||||
if not isinstance(ret[host], dict):
|
||||
|
@ -773,7 +771,9 @@ class SSH(object):
|
|||
outputter,
|
||||
self.opts)
|
||||
if self.event:
|
||||
_, data = next(six.iteritems(ret))
|
||||
id_, data = next(six.iteritems(ret))
|
||||
if 'id' not in data:
|
||||
data['id'] = id_
|
||||
data['jid'] = jid # make the jid in the payload the same as the jid in the tag
|
||||
self.event.fire_event(
|
||||
data,
|
||||
|
|
|
@ -125,7 +125,7 @@ class FunctionWrapper(object):
|
|||
'stderr': stderr,
|
||||
'retcode': retcode}
|
||||
try:
|
||||
ret = salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
ret = salt.utils.json.loads(stdout)
|
||||
if len(ret) < 2 and 'local' in ret:
|
||||
ret = ret['local']
|
||||
ret = ret.get('return', {})
|
||||
|
|
|
@ -197,7 +197,7 @@ def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
@ -341,7 +341,7 @@ def low(data, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
@ -432,7 +432,7 @@ def high(data, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
@ -677,7 +677,7 @@ def highstate(test=None, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
@ -760,7 +760,7 @@ def top(topfn, test=None, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
@ -1133,7 +1133,7 @@ def single(fun, name, test=None, **kwargs):
|
|||
|
||||
# Read in the JSON data and return the data structure
|
||||
try:
|
||||
return salt.utils.json.loads(stdout, object_hook=salt.utils.data.decode_dict)
|
||||
return salt.utils.json.loads(stdout)
|
||||
except Exception as e:
|
||||
log.error("JSON Render failed for: %s\n%s", stdout, stderr)
|
||||
log.error(six.text_type(e))
|
||||
|
|
|
@ -823,7 +823,7 @@ def query(params=None):
|
|||
|
||||
content = request.text
|
||||
|
||||
result = salt.utils.json.loads(content, object_hook=salt.utils.data.encode_dict)
|
||||
result = salt.utils.json.loads(content)
|
||||
if 'Code' in result:
|
||||
raise SaltCloudSystemExit(
|
||||
pprint.pformat(result.get('Message', {}))
|
||||
|
|
|
@ -42,10 +42,11 @@ from salt.ext import six
|
|||
# pylint: disable=import-error
|
||||
try:
|
||||
from libcloud.compute.drivers.cloudstack import CloudStackNetwork
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0.
|
||||
# However, older versions of libcloud must still be supported with this work-around.
|
||||
# This work-around can be removed when the required minimum version of libcloud is
|
||||
# 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen).
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >=
|
||||
# 1.4.0. However, older versions of libcloud must still be supported with
|
||||
# this work-around. This work-around can be removed when the required
|
||||
# minimum version of libcloud is 2.0.0 (See PR #40837 - which is
|
||||
# implemented in Salt 2018.3.0).
|
||||
if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'):
|
||||
# See https://github.com/saltstack/salt/issues/32743
|
||||
import libcloud.security
|
||||
|
|
|
@ -40,10 +40,11 @@ try:
|
|||
from libcloud.loadbalancer.types import Provider as Provider_lb
|
||||
from libcloud.loadbalancer.providers import get_driver as get_driver_lb
|
||||
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0.
|
||||
# However, older versions of libcloud must still be supported with this work-around.
|
||||
# This work-around can be removed when the required minimum version of libcloud is
|
||||
# 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen).
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >=
|
||||
# 1.4.0. However, older versions of libcloud must still be supported with
|
||||
# this work-around. This work-around can be removed when the required
|
||||
# minimum version of libcloud is 2.0.0 (See PR #40837 - which is
|
||||
# implemented in Salt 2018.3.0).
|
||||
if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'):
|
||||
# See https://github.com/saltstack/salt/issues/32743
|
||||
import libcloud.security
|
||||
|
|
|
@ -70,10 +70,11 @@ try:
|
|||
ResourceInUseError,
|
||||
ResourceNotFoundError,
|
||||
)
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >= 1.4.0.
|
||||
# However, older versions of libcloud must still be supported with this work-around.
|
||||
# This work-around can be removed when the required minimum version of libcloud is
|
||||
# 2.0.0 (See PR #40837 - which is implemented in Salt Oxygen).
|
||||
# This work-around for Issue #32743 is no longer needed for libcloud >=
|
||||
# 1.4.0. However, older versions of libcloud must still be supported with
|
||||
# this work-around. This work-around can be removed when the required
|
||||
# minimum version of libcloud is 2.0.0 (See PR #40837 - which is
|
||||
# implemented in Salt 2018.3.0).
|
||||
if _LooseVersion(libcloud.__version__) < _LooseVersion('1.4.0'):
|
||||
# See https://github.com/saltstack/salt/issues/32743
|
||||
import libcloud.security
|
||||
|
|
|
@ -758,7 +758,7 @@ def get_template_image(kwargs=None, call=None):
|
|||
'''
|
||||
Returns a template's image from the given template name.
|
||||
|
||||
.. versionadded:: oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -921,7 +921,7 @@ def _get_device_template(disk, disk_info, template=None):
|
|||
'''
|
||||
Returns the template format to create a disk in open nebula
|
||||
|
||||
.. versionadded:: oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
'''
|
||||
def _require_disk_opts(*args):
|
||||
|
|
|
@ -188,7 +188,7 @@ def query(params=None):
|
|||
log.debug(request.url)
|
||||
|
||||
content = request.text
|
||||
result = salt.utils.json.loads(content, object_hook=salt.utils.data.encode_dict)
|
||||
result = salt.utils.json.loads(content)
|
||||
|
||||
# print('response:')
|
||||
# pprint.pprint(result)
|
||||
|
|
|
@ -9,7 +9,7 @@ The Saltify module is designed to install Salt on a remote machine, virtual or
|
|||
bare metal, using SSH. This module is useful for provisioning machines which
|
||||
are already installed, but not Salted.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The wake_on_lan capability, and actions destroy, reboot, and query functions were added.
|
||||
|
||||
Use of this module requires some configuration in cloud profile and provider
|
||||
|
@ -88,7 +88,7 @@ def avail_images(call=None):
|
|||
|
||||
returns a list of available profiles.
|
||||
|
||||
..versionadded:: Oxygen
|
||||
..versionadded:: 2018.3.0
|
||||
|
||||
'''
|
||||
vm_ = get_configured_provider()
|
||||
|
@ -118,7 +118,7 @@ def list_nodes(call=None):
|
|||
|
||||
returns a list of dictionaries of defined standard fields.
|
||||
|
||||
..versionadded:: Oxygen
|
||||
..versionadded:: 2018.3.0
|
||||
|
||||
'''
|
||||
nodes = _list_nodes_full(call)
|
||||
|
@ -164,7 +164,7 @@ def list_nodes_full(call=None):
|
|||
|
||||
for 'saltify' minions, returns dict of grains (enhanced).
|
||||
|
||||
..versionadded:: Oxygen
|
||||
..versionadded:: 2018.3.0
|
||||
'''
|
||||
|
||||
ret = _list_nodes_full(call)
|
||||
|
@ -399,7 +399,7 @@ def _verify(vm_):
|
|||
def destroy(name, call=None):
|
||||
''' Destroy a node.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Disconnect a minion from the master, and remove its keys.
|
||||
|
||||
|
@ -489,7 +489,7 @@ def reboot(name, call=None):
|
|||
'''
|
||||
Reboot a saltify minion.
|
||||
|
||||
..versionadded:: Oxygen
|
||||
..versionadded:: 2018.3.0
|
||||
|
||||
name
|
||||
The name of the VM to reboot.
|
||||
|
|
|
@ -10,7 +10,7 @@ Use of this module requires some configuration in cloud profile and provider
|
|||
files as described in the
|
||||
:ref:`Getting Started with Vagrant <getting-started-with-vagrant>` documentation.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
|
||||
'''
|
||||
|
|
|
@ -1523,6 +1523,7 @@ DEFAULT_MASTER_OPTS = {
|
|||
'pillarenv': None,
|
||||
'default_top': 'base',
|
||||
'file_client': 'local',
|
||||
'local': True,
|
||||
|
||||
# Update intervals
|
||||
'roots_update_interval': DEFAULT_INTERVAL,
|
||||
|
@ -1808,7 +1809,6 @@ DEFAULT_MASTER_OPTS = {
|
|||
'schedule': {},
|
||||
'auth_events': True,
|
||||
'minion_data_cache_events': True,
|
||||
'enable_ssh': False,
|
||||
'enable_ssh_minions': False,
|
||||
}
|
||||
|
||||
|
|
|
@ -806,7 +806,7 @@ class AsyncAuth(object):
|
|||
pubkey_path = os.path.join(self.opts['pki_dir'], self.mpub)
|
||||
pub = get_rsa_pub_key(pubkey_path)
|
||||
if HAS_M2:
|
||||
payload['token'] = pub.public_encrypt(six.b(self.token), RSA.pkcs1_oaep_padding)
|
||||
payload['token'] = pub.public_encrypt(self.token, RSA.pkcs1_oaep_padding)
|
||||
else:
|
||||
cipher = PKCS1_OAEP.new(pub)
|
||||
payload['token'] = cipher.encrypt(self.token)
|
||||
|
@ -845,7 +845,8 @@ class AsyncAuth(object):
|
|||
log.debug('Decrypting the current master AES key')
|
||||
key = self.get_keys()
|
||||
if HAS_M2:
|
||||
key_str = key.private_decrypt(six.b(payload['aes']), RSA.pkcs1_oaep_padding)
|
||||
key_str = key.private_decrypt(payload['aes'],
|
||||
RSA.pkcs1_oaep_padding)
|
||||
else:
|
||||
cipher = PKCS1_OAEP.new(key)
|
||||
key_str = cipher.decrypt(payload['aes'])
|
||||
|
@ -876,7 +877,8 @@ class AsyncAuth(object):
|
|||
else:
|
||||
if 'token' in payload:
|
||||
if HAS_M2:
|
||||
token = key.private_decrypt(six.b(payload['token']), RSA.pkcs1_oaep_padding)
|
||||
token = key.private_decrypt(payload['token'],
|
||||
RSA.pkcs1_oaep_padding)
|
||||
else:
|
||||
token = cipher.decrypt(payload['token'])
|
||||
return key_str, token
|
||||
|
|
|
@ -62,7 +62,10 @@ def jobber_check(self):
|
|||
rms.append(jid)
|
||||
data = self.shells.value[jid]
|
||||
stdout, stderr = data['proc'].communicate()
|
||||
ret = salt.utils.json.loads(stdout, object_hook=salt.utils.data.encode_dict)['local']
|
||||
ret = salt.utils.json.loads(
|
||||
stdout,
|
||||
object_hook=salt.utils.data.encode_dict if six.PY2 else None
|
||||
)['local']
|
||||
route = {'src': (self.stack.value.local.name, 'manor', 'jid_ret'),
|
||||
'dst': (data['msg']['route']['src'][0], None, 'remote_cmd')}
|
||||
ret['cmd'] = '_return'
|
||||
|
|
|
@ -15,16 +15,12 @@ import errno
|
|||
# Import ioflo libs
|
||||
import ioflo.base.deeding
|
||||
# Import third party libs
|
||||
try:
|
||||
import zmq
|
||||
import salt.master
|
||||
import salt.crypt
|
||||
import salt.daemons.masterapi
|
||||
import salt.payload
|
||||
import salt.utils.stringutils
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
from salt.utils.zeromq import zmq
|
||||
import salt.master
|
||||
import salt.crypt
|
||||
import salt.daemons.masterapi
|
||||
import salt.payload
|
||||
import salt.utils.stringutils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -160,7 +156,7 @@ class SaltZmqPublisher(ioflo.base.deeding.Deed):
|
|||
'''
|
||||
Set up tracking value(s)
|
||||
'''
|
||||
if not HAS_ZMQ:
|
||||
if not zmq:
|
||||
return
|
||||
self.created = False
|
||||
self.serial = salt.payload.Serial(self.opts.value)
|
||||
|
|
|
@ -6,7 +6,7 @@ HTTP Logstash engine
|
|||
An engine that reads messages from the salt event bus and pushes
|
||||
them onto a logstash endpoint via HTTP requests.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
|
||||
.. note::
|
||||
By default, this engine take everything from the Salt bus and exports into
|
||||
|
|
|
@ -173,11 +173,7 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
import logging
|
||||
|
||||
# Import third party libraries
|
||||
try:
|
||||
import zmq
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
HAS_ZMQ = False
|
||||
from salt.utils.zeromq import zmq
|
||||
|
||||
try:
|
||||
# pylint: disable=W0611
|
||||
|
@ -209,7 +205,7 @@ def __virtual__():
|
|||
'''
|
||||
Load only if napalm-logs is installed.
|
||||
'''
|
||||
if not HAS_NAPALM_LOGS or not HAS_ZMQ:
|
||||
if not HAS_NAPALM_LOGS or not zmq:
|
||||
return (False, 'napalm_syslog could not be loaded. \
|
||||
Please install napalm-logs library amd ZeroMQ.')
|
||||
return True
|
||||
|
|
|
@ -12,9 +12,9 @@ the Master config file.
|
|||
fileserver_backend:
|
||||
- azurefs
|
||||
|
||||
Starting in Oxygen, this fileserver requires the standalone Azure Storage SDK
|
||||
for Python. Theoretically any version >= v0.20.0 should work, but it was
|
||||
developed against the v0.33.0 version.
|
||||
Starting in Salt 2018.3.0, this fileserver requires the standalone Azure
|
||||
Storage SDK for Python. Theoretically any version >= v0.20.0 should work, but
|
||||
it was developed against the v0.33.0 version.
|
||||
|
||||
Each storage container will be mapped to an environment. By default, containers
|
||||
will be mapped to the ``base`` environment. You can override this behavior with
|
||||
|
|
|
@ -14,7 +14,7 @@ Master config file.
|
|||
- gitfs
|
||||
|
||||
.. note::
|
||||
``git`` also works here. Prior to the Oxygen release, *only* ``git``
|
||||
``git`` also works here. Prior to the 2018.3.0 release, *only* ``git``
|
||||
would work.
|
||||
|
||||
The Git fileserver backend supports both pygit2_ and GitPython_, to provide the
|
||||
|
|
|
@ -11,7 +11,7 @@ Master config file.
|
|||
- hgfs
|
||||
|
||||
.. note::
|
||||
``hg`` also works here. Prior to the Oxygen release, *only* ``hg`` would
|
||||
``hg`` also works here. Prior to the 2018.3.0 release, *only* ``hg`` would
|
||||
work.
|
||||
|
||||
After enabling this backend, branches, bookmarks, and tags in a remote
|
||||
|
|
|
@ -17,8 +17,8 @@ allowed to push files to the Master), and ``minionfs`` must be added to the
|
|||
- minionfs
|
||||
|
||||
.. note::
|
||||
``minion`` also works here. Prior to the Oxygen release, *only* ``minion``
|
||||
would work.
|
||||
``minion`` also works here. Prior to the 2018.3.0 release, *only*
|
||||
``minion`` would work.
|
||||
|
||||
Other minionfs settings include: :conf_master:`minionfs_whitelist`,
|
||||
:conf_master:`minionfs_blacklist`, :conf_master:`minionfs_mountpoint`, and
|
||||
|
|
|
@ -13,8 +13,8 @@ Master config file.
|
|||
- svnfs
|
||||
|
||||
.. note::
|
||||
``svn`` also works here. Prior to the Oxygen release, *only* ``svn`` would
|
||||
work.
|
||||
``svn`` also works here. Prior to the 2018.3.0 release, *only* ``svn``
|
||||
would work.
|
||||
|
||||
This backend assumes a standard svn layout with directories for ``branches``,
|
||||
``tags``, and ``trunk``, at the repository root.
|
||||
|
|
|
@ -2488,13 +2488,16 @@ def _linux_iqn():
|
|||
ret = []
|
||||
|
||||
initiator = '/etc/iscsi/initiatorname.iscsi'
|
||||
|
||||
if os.path.isfile(initiator):
|
||||
try:
|
||||
with salt.utils.files.fopen(initiator, 'r') as _iscsi:
|
||||
for line in _iscsi:
|
||||
line = line.strip()
|
||||
if line.startswith('InitiatorName='):
|
||||
ret.append(line.split('=', 1)[1])
|
||||
except IOError as ex:
|
||||
if ex.errno != os.errno.ENOENT:
|
||||
log.debug("Error while accessing '%s': %s", initiator, ex)
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ ZFS grain provider
|
|||
:depends: salt.utils, salt.module.cmdmod
|
||||
:platform: illumos,freebsd,linux
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
'''
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
|
|
@ -24,21 +24,9 @@ import salt.serializers.msgpack
|
|||
# pylint: disable=import-error,no-name-in-module,redefined-builtin
|
||||
from salt.ext import six
|
||||
from salt.ext.six.moves import range
|
||||
from salt.utils.zeromq import zmq, ZMQDefaultLoop, install_zmq, ZMQ_VERSION_INFO
|
||||
# pylint: enable=import-error,no-name-in-module,redefined-builtin
|
||||
|
||||
try:
|
||||
import zmq
|
||||
import zmq.eventloop.ioloop
|
||||
# support pyzmq 13.0.x, TODO: remove once we force people to 14.0.x
|
||||
if not hasattr(zmq.eventloop.ioloop, 'ZMQIOLoop'):
|
||||
zmq.eventloop.ioloop.ZMQIOLoop = zmq.eventloop.ioloop.IOLoop
|
||||
LOOP_CLASS = zmq.eventloop.ioloop.ZMQIOLoop
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
import tornado.ioloop
|
||||
LOOP_CLASS = tornado.ioloop.IOLoop
|
||||
HAS_ZMQ = False
|
||||
|
||||
import tornado.gen # pylint: disable=F0401
|
||||
|
||||
# Import salt libs
|
||||
|
@ -498,23 +486,13 @@ class Master(SMaster):
|
|||
|
||||
:param dict: The salt options
|
||||
'''
|
||||
if HAS_ZMQ:
|
||||
# Warn if ZMQ < 3.2
|
||||
try:
|
||||
zmq_version_info = zmq.zmq_version_info()
|
||||
except AttributeError:
|
||||
# PyZMQ <= 2.1.9 does not have zmq_version_info, fall back to
|
||||
# using zmq.zmq_version() and build a version info tuple.
|
||||
zmq_version_info = tuple(
|
||||
[int(x) for x in zmq.zmq_version().split('.')]
|
||||
)
|
||||
if zmq_version_info < (3, 2):
|
||||
log.warning(
|
||||
'You have a version of ZMQ less than ZMQ 3.2! There are '
|
||||
'known connection keep-alive issues with ZMQ < 3.2 which '
|
||||
'may result in loss of contact with minions. Please '
|
||||
'upgrade your ZMQ!'
|
||||
)
|
||||
if zmq and ZMQ_VERSION_INFO < (3, 2):
|
||||
log.warning(
|
||||
'You have a version of ZMQ less than ZMQ 3.2! There are '
|
||||
'known connection keep-alive issues with ZMQ < 3.2 which '
|
||||
'may result in loss of contact with minions. Please '
|
||||
'upgrade your ZMQ!'
|
||||
)
|
||||
SMaster.__init__(self, opts)
|
||||
|
||||
def __set_max_open_files(self):
|
||||
|
@ -993,9 +971,8 @@ class MWorker(salt.utils.process.SignalHandlingMultiprocessingProcess):
|
|||
Bind to the local port
|
||||
'''
|
||||
# using ZMQIOLoop since we *might* need zmq in there
|
||||
if HAS_ZMQ:
|
||||
zmq.eventloop.ioloop.install()
|
||||
self.io_loop = LOOP_CLASS()
|
||||
install_zmq()
|
||||
self.io_loop = ZMQDefaultLoop()
|
||||
self.io_loop.make_current()
|
||||
for req_channel in self.req_channels:
|
||||
req_channel.post_fork(self._handle_payload, io_loop=self.io_loop) # TODO: cleaner? Maybe lazily?
|
||||
|
@ -2028,6 +2005,7 @@ class ClearFuncs(object):
|
|||
)
|
||||
minions = _res.get('minions', list())
|
||||
missing = _res.get('missing', list())
|
||||
ssh_minions = _res.get('ssh_minions', False)
|
||||
|
||||
# Check for external auth calls and authenticate
|
||||
auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(extra)
|
||||
|
@ -2095,7 +2073,7 @@ class ClearFuncs(object):
|
|||
payload = self._prep_pub(minions, jid, clear_load, extra, missing)
|
||||
|
||||
# Send it!
|
||||
minions.extend(self._send_ssh_pub(payload))
|
||||
self._send_ssh_pub(payload, ssh_minions=ssh_minions)
|
||||
self._send_pub(payload)
|
||||
|
||||
return {
|
||||
|
@ -2158,20 +2136,19 @@ class ClearFuncs(object):
|
|||
chan = salt.transport.server.PubServerChannel.factory(opts)
|
||||
chan.publish(load)
|
||||
|
||||
def _send_ssh_pub(self, load):
|
||||
@property
|
||||
def ssh_client(self):
|
||||
if not hasattr(self, '_ssh_client'):
|
||||
self._ssh_client = salt.client.ssh.client.SSHClient(mopts=self.opts)
|
||||
return self._ssh_client
|
||||
|
||||
def _send_ssh_pub(self, load, ssh_minions=False):
|
||||
'''
|
||||
Take a load and send it across the network to connected minions
|
||||
Take a load and send it across the network to ssh minions
|
||||
'''
|
||||
minions = []
|
||||
if self.opts['enable_ssh_minions'] is True and isinstance(load['tgt'], six.string_types):
|
||||
# The isinstances makes sure that syndics work
|
||||
log.debug('Use SSHClient for rostered minions')
|
||||
ssh = salt.client.ssh.client.SSHClient()
|
||||
ssh_minions = ssh._prep_ssh(**load).targets.keys()
|
||||
if ssh_minions:
|
||||
minions.extend(ssh_minions)
|
||||
threading.Thread(target=ssh.cmd, kwargs=load).start()
|
||||
return minions
|
||||
if self.opts['enable_ssh_minions'] is True and ssh_minions is True:
|
||||
log.debug('Send payload to ssh minions')
|
||||
threading.Thread(target=self.ssh_client.cmd, kwargs=load).start()
|
||||
|
||||
def _prep_pub(self, minions, jid, clear_load, extra, missing):
|
||||
'''
|
||||
|
|
|
@ -31,23 +31,11 @@ if six.PY3:
|
|||
else:
|
||||
import salt.ext.ipaddress as ipaddress
|
||||
from salt.ext.six.moves import range
|
||||
from salt.utils.zeromq import zmq, ZMQDefaultLoop, install_zmq, ZMQ_VERSION_INFO
|
||||
|
||||
# pylint: enable=no-name-in-module,redefined-builtin
|
||||
|
||||
# Import third party libs
|
||||
try:
|
||||
import zmq
|
||||
# TODO: cleanup
|
||||
import zmq.eventloop.ioloop
|
||||
# support pyzmq 13.0.x, TODO: remove once we force people to 14.0.x
|
||||
if not hasattr(zmq.eventloop.ioloop, 'ZMQIOLoop'):
|
||||
zmq.eventloop.ioloop.ZMQIOLoop = zmq.eventloop.ioloop.IOLoop
|
||||
LOOP_CLASS = zmq.eventloop.ioloop.ZMQIOLoop
|
||||
HAS_ZMQ = True
|
||||
except ImportError:
|
||||
import tornado.ioloop
|
||||
LOOP_CLASS = tornado.ioloop.IOLoop
|
||||
HAS_ZMQ = False
|
||||
|
||||
HAS_RANGE = False
|
||||
try:
|
||||
import seco.range
|
||||
|
@ -690,7 +678,7 @@ class MinionBase(object):
|
|||
if self.opts['transport'] == 'detect':
|
||||
self.opts['detect_mode'] = True
|
||||
for trans in ('zeromq', 'tcp'):
|
||||
if trans == 'zeromq' and not HAS_ZMQ:
|
||||
if trans == 'zeromq' and not zmq:
|
||||
continue
|
||||
self.opts['transport'] = trans
|
||||
pub_channel = salt.transport.client.AsyncPubChannel.factory(self.opts, **factory_kwargs)
|
||||
|
@ -793,10 +781,8 @@ class SMinion(MinionBase):
|
|||
# Clean out the proc directory (default /var/cache/salt/minion/proc)
|
||||
if (self.opts.get('file_client', 'remote') == 'remote'
|
||||
or self.opts.get('use_master_when_local', False)):
|
||||
if self.opts['transport'] == 'zeromq' and HAS_ZMQ:
|
||||
io_loop = zmq.eventloop.ioloop.ZMQIOLoop()
|
||||
else:
|
||||
io_loop = LOOP_CLASS.current()
|
||||
install_zmq()
|
||||
io_loop = ZMQDefaultLoop.current()
|
||||
io_loop.run_sync(
|
||||
lambda: self.eval_master(self.opts, failed=True)
|
||||
)
|
||||
|
@ -931,9 +917,8 @@ class MinionManager(MinionBase):
|
|||
self.minions = []
|
||||
self.jid_queue = []
|
||||
|
||||
if HAS_ZMQ:
|
||||
zmq.eventloop.ioloop.install()
|
||||
self.io_loop = LOOP_CLASS.current()
|
||||
install_zmq()
|
||||
self.io_loop = ZMQDefaultLoop.current()
|
||||
self.process_manager = ProcessManager(name='MultiMinionProcessManager')
|
||||
self.io_loop.spawn_callback(self.process_manager.run, async=True)
|
||||
|
||||
|
@ -1086,23 +1071,14 @@ class Minion(MinionBase):
|
|||
self.periodic_callbacks = {}
|
||||
|
||||
if io_loop is None:
|
||||
if HAS_ZMQ:
|
||||
zmq.eventloop.ioloop.install()
|
||||
self.io_loop = LOOP_CLASS.current()
|
||||
install_zmq()
|
||||
self.io_loop = ZMQDefaultLoop.current()
|
||||
else:
|
||||
self.io_loop = io_loop
|
||||
|
||||
# Warn if ZMQ < 3.2
|
||||
if HAS_ZMQ:
|
||||
try:
|
||||
zmq_version_info = zmq.zmq_version_info()
|
||||
except AttributeError:
|
||||
# PyZMQ <= 2.1.9 does not have zmq_version_info, fall back to
|
||||
# using zmq.zmq_version() and build a version info tuple.
|
||||
zmq_version_info = tuple(
|
||||
[int(x) for x in zmq.zmq_version().split('.')] # pylint: disable=no-member
|
||||
)
|
||||
if zmq_version_info < (3, 2):
|
||||
if zmq:
|
||||
if ZMQ_VERSION_INFO < (3, 2):
|
||||
log.warning(
|
||||
'You have a version of ZMQ less than ZMQ 3.2! There are '
|
||||
'known connection keep-alive issues with ZMQ < 3.2 which '
|
||||
|
@ -2160,6 +2136,8 @@ class Minion(MinionBase):
|
|||
self.schedule.disable_job(name, persist)
|
||||
elif func == 'postpone_job':
|
||||
self.schedule.postpone_job(name, data)
|
||||
elif func == 'skip_job':
|
||||
self.schedule.skip_job(name, data)
|
||||
elif func == 'reload':
|
||||
self.schedule.reload(schedule)
|
||||
elif func == 'list':
|
||||
|
@ -2888,9 +2866,8 @@ class SyndicManager(MinionBase):
|
|||
self.jid_forward_cache = set()
|
||||
|
||||
if io_loop is None:
|
||||
if HAS_ZMQ:
|
||||
zmq.eventloop.ioloop.install()
|
||||
self.io_loop = LOOP_CLASS.current()
|
||||
install_zmq()
|
||||
self.io_loop = ZMQDefaultLoop.current()
|
||||
else:
|
||||
self.io_loop = io_loop
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Manage account locks on AIX systems
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:depends: none
|
||||
'''
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Aptly Debian repository manager.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
'''
|
||||
# Import python libs
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
|
|
@ -497,7 +497,7 @@ def install(name=None,
|
|||
Install a specific version of the package, e.g. 1.2.3~0ubuntu0. Ignored
|
||||
if "pkgs" or "sources" is passed.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
version can now contain comparison operators (e.g. ``>1.2.3``,
|
||||
``<=2.0``, etc.)
|
||||
|
||||
|
@ -518,7 +518,7 @@ def install(name=None,
|
|||
ignored when comparing the currently-installed version to the desired
|
||||
version.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Multiple Package Installation Options:
|
||||
|
||||
|
@ -1086,7 +1086,7 @@ def upgrade(refresh=True, dist_upgrade=False, **kwargs):
|
|||
download_only
|
||||
Only donwload the packages, don't unpack or install them
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
force_conf_new
|
||||
Always install the new version of any configuration files.
|
||||
|
@ -2160,7 +2160,7 @@ def mod_repo(repo, saltenv='base', **kwargs):
|
|||
key_text
|
||||
GPG key in string form to add to the APT GPG keyring
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
consolidate : False
|
||||
If ``True``, will attempt to de-duplicate and consolidate sources
|
||||
|
|
|
@ -157,7 +157,7 @@ def list_(name,
|
|||
re-downloading the archive if the cached copy matches the specified
|
||||
hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. _tarfile: https://docs.python.org/2/library/tarfile.html
|
||||
.. _xz: http://tukaani.org/xz/
|
||||
|
@ -1135,7 +1135,7 @@ def is_encrypted(name, clean=False, saltenv='base', source_hash=None):
|
|||
re-downloading the archive if the cached copy matches the specified
|
||||
hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Examples:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Connection module for Amazon CloudFront
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:depends: boto3
|
||||
|
||||
|
|
|
@ -1865,7 +1865,7 @@ def get_all_tags(filters=None, region=None, key=None, keyid=None, profile=None):
|
|||
'''
|
||||
Describe all tags matching the filter criteria, or all tags in the account otherwise.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
filters
|
||||
(dict) - Additional constraints on which volumes to return. Note that valid filters vary
|
||||
|
|
|
@ -343,7 +343,7 @@ def create_healthcheck(ip_addr=None, fqdn=None, region=None, key=None, keyid=Non
|
|||
'''
|
||||
Create a Route53 healthcheck
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
ip_addr
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Connection module for Amazon S3 using boto3
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:configuration: This module accepts explicit AWS credentials but can also
|
||||
utilize IAM roles assigned to the instance through Instance Profiles or
|
||||
|
|
|
@ -432,7 +432,7 @@ def install(name,
|
|||
execution_timeout (str):
|
||||
Chocolatey execution timeout value you want to pass to the installation process. Default is None.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Returns:
|
||||
str: The output of the ``chocolatey`` command
|
||||
|
|
|
@ -886,7 +886,7 @@ def run(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not
|
||||
necessary) to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
@ -911,7 +911,7 @@ def run(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -934,7 +934,7 @@ def run(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to return.
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ def shell(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not necessary)
|
||||
to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
@ -1142,7 +1142,7 @@ def shell(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -1165,7 +1165,7 @@ def shell(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to
|
||||
return.
|
||||
|
@ -1316,7 +1316,7 @@ def run_stdout(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not necessary)
|
||||
to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
@ -1341,7 +1341,7 @@ def run_stdout(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -1364,7 +1364,7 @@ def run_stdout(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to
|
||||
return.
|
||||
|
@ -1492,7 +1492,7 @@ def run_stderr(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not
|
||||
necessary) to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
@ -1517,7 +1517,7 @@ def run_stderr(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -1540,7 +1540,7 @@ def run_stderr(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to
|
||||
return.
|
||||
|
@ -1670,7 +1670,7 @@ def run_all(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not
|
||||
necessary) to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
@ -1695,7 +1695,7 @@ def run_all(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -1718,7 +1718,7 @@ def run_all(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to
|
||||
return.
|
||||
|
@ -1729,7 +1729,7 @@ def run_all(cmd,
|
|||
:param bool encoded_cmd: Specify if the supplied command is encoded.
|
||||
Only applies to shell 'powershell'.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param bool redirect_stderr: If set to ``True``, then stderr will be
|
||||
redirected to stdout. This is helpful for cases where obtaining both
|
||||
|
@ -1890,7 +1890,7 @@ def retcode(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -2105,7 +2105,7 @@ def script(source,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -2128,7 +2128,7 @@ def script(source,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: If the command has not terminated after timeout
|
||||
seconds, send the subprocess sigterm, and if sigterm is ignored, follow
|
||||
|
@ -2335,7 +2335,7 @@ def script_retcode(source,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -2617,7 +2617,7 @@ def run_chroot(root,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -2640,7 +2640,7 @@ def run_chroot(root,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout:
|
||||
A timeout in seconds for the executed process to return.
|
||||
|
@ -3078,7 +3078,7 @@ def powershell(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -3101,7 +3101,7 @@ def powershell(cmd,
|
|||
This is separate from ``output_loglevel``, which only handles how
|
||||
Salt logs to the minion log.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param int timeout: A timeout in seconds for the executed process to return.
|
||||
|
||||
|
@ -3282,7 +3282,7 @@ def powershell_all(cmd,
|
|||
salt '*' cmd.run_all '$PSVersionTable.CLRVersion' shell=powershell
|
||||
salt '*' cmd.run_all 'Get-NetTCPConnection' shell=powershell
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. warning::
|
||||
|
||||
|
@ -3362,7 +3362,7 @@ def powershell_all(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -3567,7 +3567,7 @@ def run_bg(cmd,
|
|||
the `locale` line in the output of :py:func:`test.versions_report
|
||||
<salt.modules.test.versions_report>`.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str output_loglevel: Control the loglevel at which the output from
|
||||
the command is logged to the minion log.
|
||||
|
@ -3617,7 +3617,7 @@ def run_bg(cmd,
|
|||
:param str prepend_path: $PATH segment to prepend (trailing ':' not
|
||||
necessary) to $PATH
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:param str template: If this setting is applied then the named templating
|
||||
engine will be used to render the downloaded file. Currently jinja,
|
||||
|
|
|
@ -240,7 +240,7 @@ def get_file(path,
|
|||
gzip=None,
|
||||
**kwargs):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
``dest`` can now be a directory
|
||||
|
||||
Used to get a single file from the salt master
|
||||
|
@ -354,7 +354,7 @@ def get_dir(path, dest, saltenv='base', template=None, gzip=None, **kwargs):
|
|||
|
||||
def get_url(path, dest='', saltenv='base', makedirs=False, source_hash=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
``dest`` can now be a directory
|
||||
|
||||
Used to get a single file from a URL.
|
||||
|
@ -391,7 +391,7 @@ def get_url(path, dest='', saltenv='base', makedirs=False, source_hash=None):
|
|||
minion's file cache, this option can be passed to keep the minion from
|
||||
re-downloading the file if the cached copy matches the specified hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -445,7 +445,7 @@ def cache_file(path, saltenv='base', source_hash=None):
|
|||
minion's file cache, this option can be passed to keep the minion from
|
||||
re-downloading the file if the cached copy matches the specified hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Salt module to manage Unix cryptsetup jobs and the crypttab file
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
'''
|
||||
|
||||
# Import python libraries
|
||||
|
|
|
@ -229,7 +229,7 @@ def status(name, sig=None):
|
|||
If the name contains globbing, a dict mapping service name to True/False
|
||||
values is returned.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The service name can now be a glob (e.g. ``salt*``)
|
||||
|
||||
Args:
|
||||
|
|
|
@ -789,7 +789,7 @@ def get_client_args(limit=None):
|
|||
.. versionchanged:: 2017.7.0
|
||||
Replaced the container config args with the ones from the API's
|
||||
``create_container`` function.
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Added ability to limit the input to specific client functions
|
||||
|
||||
Many functions in Salt have been written to support the full list of
|
||||
|
@ -884,7 +884,7 @@ def _get_create_kwargs(skip_translate=None,
|
|||
def compare_containers(first, second, ignore=None):
|
||||
'''
|
||||
.. versionadded:: 2017.7.0
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Renamed from ``docker.compare_container`` to
|
||||
``docker.compare_containers`` (old function name remains as an alias)
|
||||
|
||||
|
@ -967,7 +967,7 @@ compare_container = salt.utils.functools.alias_function(
|
|||
|
||||
def compare_container_networks(first, second):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Returns the differences between two containers' networks. When a network is
|
||||
only present one of the two containers, that network's diff will simply be
|
||||
|
@ -1204,7 +1204,7 @@ def compare_container_networks(first, second):
|
|||
|
||||
def compare_networks(first, second, ignore='Name,Id,Created,Containers'):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Compare two networks and return any differences between the two
|
||||
|
||||
|
@ -1277,7 +1277,7 @@ def compare_networks(first, second, ignore='Name,Id,Created,Containers'):
|
|||
|
||||
def connected(name, verbose=False):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Return a list of running containers attached to the specified network
|
||||
|
||||
|
@ -1866,7 +1866,7 @@ def list_tags():
|
|||
|
||||
def resolve_image_id(name):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Given an image name (or partial image ID), return the full image ID. If no
|
||||
match is found among the locally-pulled images, then ``False`` will be
|
||||
|
@ -1897,7 +1897,7 @@ def resolve_image_id(name):
|
|||
def resolve_tag(name, tags=None, **kwargs):
|
||||
'''
|
||||
.. versionadded:: 2017.7.2
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Instead of matching against pulled tags using
|
||||
:py:func:`docker.list_tags <salt.modules.dockermod.list_tags>`, this
|
||||
function now simply inspects the passed image name using
|
||||
|
@ -1920,10 +1920,10 @@ def resolve_tag(name, tags=None, **kwargs):
|
|||
is found but there are no tags, then a list will still be returned, but
|
||||
it will simply contain the image ID.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tags
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Ignored if passed, will be removed in the Neon release.
|
||||
|
||||
CLI Examples:
|
||||
|
@ -1972,7 +1972,7 @@ def resolve_tag(name, tags=None, **kwargs):
|
|||
|
||||
def logs(name, **kwargs):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Support for all of docker-py's `logs()`_ function's arguments, with the
|
||||
exception of ``stream``.
|
||||
|
||||
|
@ -2393,7 +2393,7 @@ def create(image,
|
|||
start : False
|
||||
If ``True``, start container after creating it
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
skip_translate
|
||||
This function translates Salt CLI or SLS input into the format which
|
||||
|
@ -2764,7 +2764,7 @@ def create(image,
|
|||
- ``labels=foo,bar=baz``
|
||||
- ``labels="['foo', 'bar=baz']"``
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Labels both with and without values can now be mixed. Earlier
|
||||
releases only permitted one method or the other.
|
||||
|
||||
|
@ -3158,7 +3158,7 @@ def run_container(image,
|
|||
networks=None,
|
||||
**kwargs):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Equivalent to ``docker run`` on the Docker CLI. Runs the container, waits
|
||||
for it to exit, and returns the container's logs when complete.
|
||||
|
@ -3762,7 +3762,7 @@ def rm_(name, force=False, volumes=False, **kwargs):
|
|||
Optional timeout to be passed to :py:func:`docker.stop
|
||||
<salt.modules.dockermod.stop>` if stopping the container.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
volumes : False
|
||||
Also remove volumes associated with container
|
||||
|
@ -3839,7 +3839,7 @@ def build(path=None,
|
|||
buildargs=None,
|
||||
image=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
If the built image should be tagged, then the repository and tag must
|
||||
now be passed separately using the ``repository`` and ``tag``
|
||||
arguments, rather than together in the (now deprecated) ``image``
|
||||
|
@ -3853,15 +3853,15 @@ def build(path=None,
|
|||
repository
|
||||
Optional repository name for the image being built
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag : latest
|
||||
Tag name for the image (required if ``repository`` is passed)
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
image
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
cache : True
|
||||
|
@ -4020,7 +4020,7 @@ def commit(name,
|
|||
author=None,
|
||||
image=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The repository and tag must now be passed separately using the
|
||||
``repository`` and ``tag`` arguments, rather than together in the (now
|
||||
deprecated) ``image`` argument.
|
||||
|
@ -4034,15 +4034,15 @@ def commit(name,
|
|||
repository
|
||||
Repository name for the image being committed
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag : latest
|
||||
Tag name for the image
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
image
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
message
|
||||
|
@ -4168,7 +4168,7 @@ def import_(source,
|
|||
api_response=False,
|
||||
image=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The repository and tag must now be passed separately using the
|
||||
``repository`` and ``tag`` arguments, rather than together in the (now
|
||||
deprecated) ``image`` argument.
|
||||
|
@ -4185,15 +4185,15 @@ def import_(source,
|
|||
repository
|
||||
Repository name for the image being imported
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag : latest
|
||||
Tag name for the image
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
image
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
api_response : False
|
||||
|
@ -4276,7 +4276,7 @@ def import_(source,
|
|||
|
||||
def load(path, repository=None, tag=None, image=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
If the loaded image should be tagged, then the repository and tag must
|
||||
now be passed separately using the ``repository`` and ``tag``
|
||||
arguments, rather than together in the (now deprecated) ``image``
|
||||
|
@ -4298,16 +4298,16 @@ def load(path, repository=None, tag=None, image=None):
|
|||
<salt.modules.dockermod.tag_>`. If a repository name is provided, then
|
||||
the ``tag`` argument is also required.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag
|
||||
Tag name to go along with the repository name, if the loaded image is
|
||||
to be tagged.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
image
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
|
||||
|
@ -4433,7 +4433,7 @@ def pull(image,
|
|||
api_response=False,
|
||||
client_timeout=salt.utils.docker.CLIENT_TIMEOUT):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
If no tag is specified in the ``image`` argument, all tags for the
|
||||
image will be pulled. For this reason is it recommended to pass
|
||||
``image`` using the ``repo:tag`` notation.
|
||||
|
@ -4900,7 +4900,7 @@ def save(name,
|
|||
|
||||
def tag_(name, repository, tag='latest', force=False, image=None):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The repository and tag must now be passed separately using the
|
||||
``repository`` and ``tag`` arguments, rather than together in the (now
|
||||
deprecated) ``image`` argument.
|
||||
|
@ -4914,15 +4914,15 @@ def tag_(name, repository, tag='latest', force=False, image=None):
|
|||
repository
|
||||
Repository name for the image to be built
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag : latest
|
||||
Tag name for the image to be built
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
image
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
force : False
|
||||
|
@ -4964,7 +4964,7 @@ def networks(names=None, ids=None):
|
|||
.. versionchanged:: 2017.7.0
|
||||
The ``names`` and ``ids`` can be passed as a comma-separated list now,
|
||||
as well as a Python list.
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The ``Containers`` key for each network is no longer always empty.
|
||||
|
||||
List existing networks
|
||||
|
@ -5008,7 +5008,7 @@ def create_network(name,
|
|||
client_timeout=salt.utils.docker.CLIENT_TIMEOUT,
|
||||
**kwargs):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Support added for network configuration options other than ``driver``
|
||||
and ``driver_opts``, as well as IPAM configuration.
|
||||
|
||||
|
@ -5053,7 +5053,7 @@ def create_network(name,
|
|||
- docker-py `low-level API`_
|
||||
- `Docker Engine API`_
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
ignore_collisions : False
|
||||
Since many of docker-py's arguments differ in name from their CLI
|
||||
|
@ -5064,7 +5064,7 @@ def create_network(name,
|
|||
will be raised. Set this argument to ``True`` to suppress these errors
|
||||
and keep the docker-py version of the argument.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
validate_ip_addrs : True
|
||||
For parameters which accept IP addresses as input, IP address
|
||||
|
@ -5076,7 +5076,7 @@ def create_network(name,
|
|||
portion will be validated, and the subnet size will be checked to
|
||||
confirm it is a valid number (1-32 for IPv4, 1-128 for IPv6).
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
.. _salt-modules-dockermod-create-network-netconf:
|
||||
|
||||
|
@ -5312,7 +5312,7 @@ def connect_container_to_network(container, net_id, **kwargs):
|
|||
.. versionadded:: 2015.8.3
|
||||
.. versionchanged:: 2017.7.0
|
||||
Support for ``ipv4_address`` argument added
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
All arguments are now passed through to
|
||||
`connect_container_to_network()`_, allowing for any new arguments added
|
||||
to this function to be supported automagically.
|
||||
|
@ -5396,7 +5396,7 @@ def disconnect_container_from_network(container, network_id):
|
|||
|
||||
def disconnect_all_containers_from_network(network_id):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Runs :py:func:`docker.disconnect_container_from_network
|
||||
<salt.modules.dockermod.disconnect_container_from_network>` on all
|
||||
|
@ -6582,7 +6582,7 @@ def sls(name, mods=None, **kwargs):
|
|||
:conf_minion:`pillarenv` minion config option nor this CLI argument is
|
||||
used, all Pillar environments will be merged together.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
pillar
|
||||
Custom Pillar values, passed as a dictionary of key-value pairs
|
||||
|
@ -6591,7 +6591,7 @@ def sls(name, mods=None, **kwargs):
|
|||
Values passed this way will override Pillar values set via
|
||||
``pillar_roots`` or an external Pillar source.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
@ -6678,7 +6678,7 @@ def sls_build(repository,
|
|||
dryrun=False,
|
||||
**kwargs):
|
||||
'''
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The repository and tag must now be passed separately using the
|
||||
``repository`` and ``tag`` arguments, rather than together in the (now
|
||||
deprecated) ``image`` argument.
|
||||
|
@ -6692,15 +6692,15 @@ def sls_build(repository,
|
|||
repository
|
||||
Repository name for the image to be built
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
tag : latest
|
||||
Tag name for the image to be built
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
name
|
||||
.. deprecated:: Oxygen
|
||||
.. deprecated:: 2018.3.0
|
||||
Use both ``repository`` and ``tag`` instead
|
||||
|
||||
base : opensuse/python
|
||||
|
@ -6721,7 +6721,7 @@ def sls_build(repository,
|
|||
:conf_minion:`pillarenv` minion config option nor this CLI argument is
|
||||
used, all Pillar environments will be merged together.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
pillar
|
||||
Custom Pillar values, passed as a dictionary of key-value pairs
|
||||
|
@ -6730,7 +6730,7 @@ def sls_build(repository,
|
|||
Values passed this way will override Pillar values set via
|
||||
``pillar_roots`` or an external Pillar source.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
dryrun: False
|
||||
when set to True the container will not be commited at the end of
|
||||
|
|
|
@ -505,7 +505,7 @@ def chgrp(path, group):
|
|||
|
||||
def _cmp_attrs(path, attrs):
|
||||
'''
|
||||
.. versionadded: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Compare attributes of a given file to given attributes.
|
||||
Returns a pair (list) where first item are attributes to
|
||||
|
@ -534,7 +534,7 @@ def _cmp_attrs(path, attrs):
|
|||
|
||||
def lsattr(path):
|
||||
'''
|
||||
.. versionadded: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Obtain the modifiable attributes of the given file. If path
|
||||
is to a directory, an empty list is returned.
|
||||
|
@ -565,7 +565,7 @@ def lsattr(path):
|
|||
|
||||
def chattr(*args, **kwargs):
|
||||
'''
|
||||
.. versionadded: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Change the attributes of files
|
||||
|
||||
|
@ -3974,7 +3974,7 @@ def get_managed(
|
|||
attrs
|
||||
Attributes of file
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
context
|
||||
Variables to add to the template context
|
||||
|
@ -4726,7 +4726,7 @@ def check_file_meta(
|
|||
attrs
|
||||
Destination file attributes
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
saltenv
|
||||
Salt environment used to resolve source files
|
||||
|
@ -4832,14 +4832,14 @@ def get_diff(file1,
|
|||
file1
|
||||
The first file to feed into the diff utility
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Can now be either a local or remote file. In earlier releases,
|
||||
thuis had to be a file local to the minion.
|
||||
|
||||
file2
|
||||
The second file to feed into the diff utility
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
Can now be either a local or remote file. In earlier releases, this
|
||||
had to be a file on the salt fileserver (i.e.
|
||||
``salt://somefile.txt``)
|
||||
|
@ -4858,7 +4858,7 @@ def get_diff(file1,
|
|||
except for within states, with the ``obfuscate_templates`` option set
|
||||
to ``True``.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
source_hash_file1
|
||||
If ``file1`` is an http(s)/ftp URL and the file exists in the minion's
|
||||
|
@ -4866,7 +4866,7 @@ def get_diff(file1,
|
|||
re-downloading the archive if the cached copy matches the specified
|
||||
hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
source_hash_file2
|
||||
If ``file2`` is an http(s)/ftp URL and the file exists in the minion's
|
||||
|
@ -4874,7 +4874,7 @@ def get_diff(file1,
|
|||
re-downloading the archive if the cached copy matches the specified
|
||||
hash.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Examples:
|
||||
|
||||
|
@ -5012,7 +5012,7 @@ def manage_file(name,
|
|||
attrs
|
||||
attributes to be set on file: '' means remove all of them
|
||||
|
||||
.. versionadded: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
makedirs
|
||||
make directories if they do not exist
|
||||
|
|
|
@ -484,7 +484,7 @@ def status(name, sig=None, jail=None):
|
|||
|
||||
.. versionchanged:: 2016.3.4
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The service name can now be a glob (e.g. ``salt*``)
|
||||
|
||||
Args:
|
||||
|
|
|
@ -6,7 +6,7 @@ and the set of routes for a particular VM is called its routing table.
|
|||
For each packet leaving a virtual machine, the system searches that machine's
|
||||
routing table for a single best matching route.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
This module will create a route to send traffic destined to the Internet
|
||||
through your gateway instance.
|
||||
|
|
|
@ -242,7 +242,7 @@ def status(name, sig=None):
|
|||
If the name contains globbing, a dict mapping service name to True/False
|
||||
values is returned.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The service name can now be a glob (e.g. ``salt*``)
|
||||
|
||||
Args:
|
||||
|
|
|
@ -186,6 +186,28 @@ def _format_git_opts(opts):
|
|||
return _format_opts(opts)
|
||||
|
||||
|
||||
def _find_ssh_exe():
|
||||
'''
|
||||
Windows only: search for Git's bundled ssh.exe in known locations
|
||||
'''
|
||||
# Known locations for Git's ssh.exe in Windows
|
||||
globmasks = [os.path.join(os.getenv('SystemDrive'), os.sep,
|
||||
'Program Files*', 'Git', 'usr', 'bin',
|
||||
'ssh.exe'),
|
||||
os.path.join(os.getenv('SystemDrive'), os.sep,
|
||||
'Program Files*', 'Git', 'bin',
|
||||
'ssh.exe')]
|
||||
for globmask in globmasks:
|
||||
ssh_exe = glob.glob(globmask)
|
||||
if ssh_exe and os.path.isfile(ssh_exe[0]):
|
||||
ret = ssh_exe[0]
|
||||
break
|
||||
else:
|
||||
ret = None
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def _git_run(command, cwd=None, user=None, password=None, identity=None,
|
||||
ignore_retcode=False, failhard=True, redirect_stderr=False,
|
||||
saltenv='base', **kwargs):
|
||||
|
@ -246,22 +268,12 @@ def _git_run(command, cwd=None, user=None, password=None, identity=None,
|
|||
)
|
||||
tmp_ssh_wrapper = None
|
||||
if salt.utils.platform.is_windows():
|
||||
# Known locations for Git's ssh.exe in Windows
|
||||
globmasks = [os.path.join(os.getenv('SystemDrive'), os.sep,
|
||||
'Program Files*', 'Git', 'usr', 'bin',
|
||||
'ssh.exe'),
|
||||
os.path.join(os.getenv('SystemDrive'), os.sep,
|
||||
'Program Files*', 'Git', 'bin',
|
||||
'ssh.exe')]
|
||||
for globmask in globmasks:
|
||||
ssh_exe = glob.glob(globmask)
|
||||
if ssh_exe and os.path.isfile(ssh_exe[0]):
|
||||
env['GIT_SSH_EXE'] = ssh_exe[0]
|
||||
break
|
||||
else:
|
||||
ssh_exe = _find_ssh_exe()
|
||||
if ssh_exe is None:
|
||||
raise CommandExecutionError(
|
||||
'Failed to find ssh.exe, unable to use identity file'
|
||||
)
|
||||
env['GIT_SSH_EXE'] = ssh_exe
|
||||
# Use the windows batch file instead of the bourne shell script
|
||||
ssh_id_wrapper += '.bat'
|
||||
env['GIT_SSH'] = ssh_id_wrapper
|
||||
|
@ -275,7 +287,7 @@ def _git_run(command, cwd=None, user=None, password=None, identity=None,
|
|||
env['GIT_SSH'] = tmp_ssh_wrapper
|
||||
|
||||
if 'salt-call' not in _salt_cli \
|
||||
and __salt__['ssh.key_is_encrypted'](id_file):
|
||||
and __utils__['ssh.key_is_encrypted'](id_file):
|
||||
errors.append(
|
||||
'Identity file {0} is passphrase-protected and cannot be '
|
||||
'used in a non-interactive command. Using salt-call from '
|
||||
|
@ -302,25 +314,33 @@ def _git_run(command, cwd=None, user=None, password=None, identity=None,
|
|||
redirect_stderr=redirect_stderr,
|
||||
**kwargs)
|
||||
finally:
|
||||
# Cleanup the temporary ssh wrapper file
|
||||
try:
|
||||
__salt__['file.remove'](tmp_ssh_wrapper)
|
||||
log.debug('Removed ssh wrapper file %s', tmp_ssh_wrapper)
|
||||
except AttributeError:
|
||||
# No wrapper was used
|
||||
pass
|
||||
except (SaltInvocationError, CommandExecutionError) as exc:
|
||||
log.warning('Failed to remove ssh wrapper file %s: %s', tmp_ssh_wrapper, exc)
|
||||
if tmp_ssh_wrapper:
|
||||
# Cleanup the temporary ssh wrapper file
|
||||
try:
|
||||
__salt__['file.remove'](tmp_ssh_wrapper)
|
||||
log.debug('Removed ssh wrapper file %s', tmp_ssh_wrapper)
|
||||
except AttributeError:
|
||||
# No wrapper was used
|
||||
pass
|
||||
except (SaltInvocationError, CommandExecutionError) as exc:
|
||||
log.warning(
|
||||
'Failed to remove ssh wrapper file %s: %s',
|
||||
tmp_ssh_wrapper, exc
|
||||
)
|
||||
|
||||
# Cleanup the temporary identity file
|
||||
try:
|
||||
__salt__['file.remove'](tmp_identity_file)
|
||||
log.debug('Removed identity file %s', tmp_identity_file)
|
||||
except AttributeError:
|
||||
# No identify file was used
|
||||
pass
|
||||
except (SaltInvocationError, CommandExecutionError) as exc:
|
||||
log.warning('Failed to remove identity file %s: %s', tmp_identity_file, exc)
|
||||
if tmp_identity_file:
|
||||
# Cleanup the temporary identity file
|
||||
try:
|
||||
__salt__['file.remove'](tmp_identity_file)
|
||||
log.debug('Removed identity file %s', tmp_identity_file)
|
||||
except AttributeError:
|
||||
# No identify file was used
|
||||
pass
|
||||
except (SaltInvocationError, CommandExecutionError) as exc:
|
||||
log.warning(
|
||||
'Failed to remove identity file %s: %s',
|
||||
tmp_identity_file, exc
|
||||
)
|
||||
|
||||
# If the command was successful, no need to try additional IDs
|
||||
if result['retcode'] == 0:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Glance module for interacting with OpenStack Glance
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:depends:shade
|
||||
|
||||
|
|
|
@ -1051,7 +1051,7 @@ def verify(text=None,
|
|||
|
||||
signature
|
||||
Specify the filename of a detached signature.
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
'''
|
||||
Keystone module for interacting with OpenStack Keystone
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:depends:shade
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ def status(name, runas=None):
|
|||
If the name contains globbing, a dict mapping service name to True/False
|
||||
values is returned.
|
||||
|
||||
.. versionchanged:: Oxygen
|
||||
.. versionchanged:: 2018.3.0
|
||||
The service name can now be a glob (e.g. ``salt*``)
|
||||
|
||||
Args:
|
||||
|
|
|
@ -8,7 +8,7 @@ of supported clouds, see http://libcloud.readthedocs.io/en/latest/compute/suppor
|
|||
|
||||
Clouds include Amazon EC2, Azure, Google GCE, VMware, OpenStack Nova
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:configuration:
|
||||
This module uses a configuration profile for one or multiple cloud providers
|
||||
|
|
|
@ -8,7 +8,7 @@ of supported clouds, see http://libcloud.readthedocs.io/en/latest/loadbalancer/s
|
|||
|
||||
Clouds include Amazon ELB, ALB, Google, Aliyun, CloudStack, Softlayer
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:configuration:
|
||||
This module uses a configuration profile for one or multiple Storage providers
|
||||
|
|
|
@ -8,7 +8,7 @@ of supported clouds, see http://libcloud.readthedocs.io/en/latest/storage/suppor
|
|||
|
||||
Clouds include Amazon S3, Google Storage, Aliyun, Azure Blobs, Ceph, OpenStack swift
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
:configuration:
|
||||
This module uses a configuration profile for one or multiple Storage providers
|
||||
|
|
|
@ -183,7 +183,7 @@ def list_conf(conf_file=default_conf, log_file=None, include_unset=False):
|
|||
'''
|
||||
Show parsed configuration
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
conf_file : string
|
||||
path to logadm.conf, defaults to /etc/logadm.conf
|
||||
|
@ -222,7 +222,7 @@ def show_args():
|
|||
'''
|
||||
Show which arguments map to which flags and options.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
CLI Example:
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ def persist(name, value, config='/etc/sysctl.conf', apply_change=False):
|
|||
|
||||
with salt.utils.files.fopen(config, 'r') as ifile:
|
||||
for line in ifile:
|
||||
line = salt.utils.stringutils.to_unicode(line).rstrip('\n')
|
||||
line = salt.utils.stringutils.to_unicode(line)
|
||||
if not line.startswith('{0}='.format(name)):
|
||||
nlines.append(line)
|
||||
continue
|
||||
|
|
|
@ -24,6 +24,7 @@ from salt.ext.six import string_types
|
|||
|
||||
# Import salt libs
|
||||
import salt.utils.args
|
||||
import salt.utils.data
|
||||
import salt.utils.decorators.path
|
||||
import salt.utils.files
|
||||
import salt.utils.stringutils
|
||||
|
@ -571,7 +572,7 @@ def _kcpassword(password):
|
|||
|
||||
# Convert each byte back to a character
|
||||
password = list(map(chr, password))
|
||||
return ''.join(password)
|
||||
return b''.join(salt.utils.data.encode(password))
|
||||
|
||||
|
||||
def enable_auto_login(name, password):
|
||||
|
@ -609,7 +610,7 @@ def enable_auto_login(name, password):
|
|||
# Create/Update the kcpassword file with an obfuscated password
|
||||
o_password = _kcpassword(password=password)
|
||||
with salt.utils.files.set_umask(0o077):
|
||||
with salt.utils.files.fopen('/etc/kcpassword', 'w') as fd:
|
||||
with salt.utils.files.fopen('/etc/kcpassword', 'w' if six.PY2 else 'wb') as fd:
|
||||
fd.write(o_password)
|
||||
|
||||
return current if isinstance(current, bool) else current.lower() == name.lower()
|
||||
|
|
|
@ -15,7 +15,7 @@ In the minion configuration file, the following block is required:
|
|||
mandrill:
|
||||
key: <API_KEY>
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
'''
|
||||
|
||||
# Import Python libs
|
||||
|
|
|
@ -1303,7 +1303,7 @@ def is_mounted(name):
|
|||
|
||||
def read_mount_cache(name):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Provide information if the path is mounted
|
||||
|
||||
|
@ -1327,7 +1327,7 @@ def write_mount_cache(real_name,
|
|||
fstype,
|
||||
mount_opts):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Provide information if the path is mounted
|
||||
|
||||
|
@ -1367,7 +1367,7 @@ def write_mount_cache(real_name,
|
|||
|
||||
def delete_mount_cache(real_name):
|
||||
'''
|
||||
.. versionadded:: Oxygen
|
||||
.. versionadded:: 2018.3.0
|
||||
|
||||
Provide information if the path is mounted
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue