Merge remote-tracking branch 'upstream/2015.5' into merge-forward-develop

Conflicts:
    doc/topics/ssh/roster.rst
    salt/modules/win_groupadd.py
This commit is contained in:
Colton Myers 2015-05-06 15:49:50 -06:00
commit ece63c36a3
111 changed files with 2001 additions and 1786 deletions

View file

@ -299,6 +299,17 @@
# will cause minion to throw an exception and drop the message.
# sign_pub_messages: False
##### Salt-SSH Configuration #####
##########################################
# Pass in an alternative location for the salt-ssh roster file
#roster_file: /etc/salt/roster
# Pass in minion option overrides that will be inserted into the SHIM for
# salt-ssh calls. The local minion config is not used for salt-ssh. Can be
# overridden on a per-minion basis in the roster (`minion_opts`)
#ssh_minion_opts:
# gpg_keydir: /root/gpg
##### Master Module Management #####
##########################################

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-API" "1" "April 21, 2015" "2015.2.0rc2-143-g32ef5ca" "Salt"
.TH "SALT-API" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-api \- salt-api Command
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-CALL" "1" "April 14, 2015" "2014.7.4-180-gc0d1bdd" "Salt"
.TH "SALT-CALL" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-call \- salt-call Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-CLOUD" "1" "April 21, 2015" "2015.2.0rc2-143-g32ef5ca" "Salt"
.TH "SALT-CLOUD" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-cloud \- Salt Cloud Command
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-CP" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-CP" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-cp \- salt-cp Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-KEY" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-KEY" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-key \- salt-key Documentation
.
@ -70,6 +70,17 @@ on most systems is \fB/etc/salt\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-u USER, \-\-user=USER
Specify user to run salt\-key
.UNINDENT
.INDENT 0.0
.TP
.B \-\-hard\-crash
Raise any original exception rather than exiting gracefully. Default is
False.
.UNINDENT
.INDENT 0.0
.TP
.B \-q, \-\-quiet
Suppress output
.UNINDENT
@ -78,6 +89,13 @@ Suppress output
.B \-y, \-\-yes
Answer \(aqYes\(aq to all questions presented, defaults to False
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rotate\-aes\-key=ROTATE_AES_KEY
Setting this to False prevents the master from refreshing the key session
when keys are deleted or rejected, this lowers the security of the key
deletion/rejection operation. Default is True.
.UNINDENT
.SS Logging Options
.sp
Logging options which override any settings defined on the configuration files.
@ -246,6 +264,35 @@ the \(aq\-\-gen\-keys\(aq option, the key size must be 2048 or
higher, otherwise it will be rounded up to 2048. The
default is 2048.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-gen\-signature
Create a signature file of the masters public\-key named
master_pubkey_signature. The signature can be send to a minion in the
masters auth\-reply and enables the minion to verify the masters public\-key
cryptographically. This requires a new signing\-key\- pair which can be
auto\-created with the \-\-auto\-create parameter.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-priv=PRIV
The private\-key file to create a signature with
.UNINDENT
.INDENT 0.0
.TP
.B \-\-signature\-path=SIGNATURE_PATH
The path where the signature file should be written
.UNINDENT
.INDENT 0.0
.TP
.B \-\-pub=PUB
The public\-key file to create a signature for
.UNINDENT
.INDENT 0.0
.TP
.B \-\-auto\-create
Auto\-create a signing key\-pair if it does not yet exist
.UNINDENT
.SH SEE ALSO
.sp
\fIsalt(7)\fP

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-MASTER" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-MASTER" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-master \- salt-master Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-MINION" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-MINION" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-minion \- salt-minion Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-RUN" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-RUN" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-run \- salt-run Documentation
.
@ -80,6 +80,12 @@ query the minions and check on running jobs. Default: 1
.UNINDENT
.INDENT 0.0
.TP
.B \-\-hard\-crash
Raise any original exception rather than exiting gracefully. Default is
False.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-doc, \-\-documentation
Display documentation for runners, pass a module or a runner to see
documentation on only that module/runner.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-SSH" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-SSH" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-ssh \- salt-ssh Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-SYNDIC" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-SYNDIC" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-syndic \- salt-syndic Documentation
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT-UNITY" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT-UNITY" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt-unity \- salt-unity Command
.

View file

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SALT" "1" "March 09, 2015" "2015.2.0rc1-133-g24fa806" "Salt"
.TH "SALT" "1" "May 06, 2015" "2015.5.0" "Salt"
.SH NAME
salt \- salt
.
@ -98,9 +98,9 @@ New in version 0.17.
.sp
Override the configured \fBstate_output\fP value for minion output. One of
\fBfull\fP, \fBterse\fP, \fBmixed\fP, \fBchanges\fP or \fBfilter\fP\&.
Default: \fBfull\fB\&.
\fBfull\fP, \fBterse\fP, \fBmixed\fP, \fBchanges\fP or \fBfilter\fP\&. Default:
\fBfull\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-subset=SUBSET

File diff suppressed because it is too large Load diff

View file

@ -396,7 +396,7 @@ local job cache on the master.
``event_return``
-----------------
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Default: ``''``
@ -493,6 +493,10 @@ that connect to a master via localhost.
presence_events: False
Salt-SSH Configuration
======================
.. conf_master:: roster_file
``roster_file``
@ -506,6 +510,23 @@ Pass in an alternative location for the salt-ssh roster file.
roster_file: /root/roster
.. conf_master:: ssh_minion_opts
``ssh_minion_opts``
-------------------
Default: None
Pass in minion option overrides that will be inserted into the SHIM for
salt-ssh calls. The local minion config is not used for salt-ssh. Can be
overridden on a per-minion basis in the roster (``minion_opts``)
.. code-block:: yaml
minion_opts:
gpg_keydir: /root/gpg
Master Security Settings
========================
@ -1874,7 +1895,7 @@ There are additional details at :ref:`salt-pillars`
``ext_pillar_first``
--------------------
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The ext_pillar_first option allows for external pillar sources to populate
before file system pillar. This allows for targeting file system pillar from

View file

@ -296,7 +296,7 @@ only the EC2 driver supports this functionality.
SSH Agent
=========
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
If the ssh key is not stored on the server salt-cloud is being run on, set
ssh_agent, and salt-cloud will use the forwarded ssh-agent to authenticate.

View file

@ -68,7 +68,7 @@ be adjusted for the minion via the `mine_interval` option:
Mine in Salt-SSH
================
As of the 2015.2.0 release of salt, salt-ssh supports ``mine.get``.
As of the 2015.5.0 release of salt, salt-ssh supports ``mine.get``.
Because the minions cannot provide their own ``mine_functions`` configuration,
we retrieve the args for specified mine functions in one of three places,

View file

@ -46,7 +46,7 @@ paradigm. This allows for many new capabilities to be added to Salt in the
upcoming releases.
Please keep in mind that this is a beta release of RAET and we hope for bugs to
be worked out, performance to be better realized and more in the 2015.2.0
be worked out, performance to be better realized and more in the 2015.5.0
release.
Simply stated, users running Salt with RAET should expect some hiccups as we

View file

@ -1,8 +1,8 @@
==============================================
Salt 2015.2.0 Release Notes - Codename Lithium
Salt 2015.5.0 Release Notes - Codename Lithium
==============================================
The 2015.2.0 feature release of Salt is focused on hardening Salt and mostly
The 2015.5.0 feature release of Salt is focused on hardening Salt and mostly
on improving existing systems. A few major additions are present, primarily
the new Beacon system. Most enhancements have been focused around improving
existing features and interfaces.

View file

@ -133,6 +133,15 @@ file is in ``/etc/salt/master``. If one wishes to use a customized configuration
the ``-c`` option to Salt SSH facilitates passing in a directory to look inside for a
configuration file named ``master``.
Minion Config
---------------
.. versionadded:: 2015.2.1
Minion config options can be defined globally using the master configuration
option ``ssh_minion_opts``. It can also be defined on a per-minion basis with
the ``minion_opts`` entry in the roster.
Running Salt SSH as non-root user
=================================

View file

@ -34,25 +34,27 @@ The information which can be stored in a roster `target` is the following:
.. code-block:: yaml
<Salt ID>: # The id to reference the target system with
host: # The IP address or DNS name of the remote host
user: # The user to log in as
passwd: # The password to log in with
<Salt ID>: # The id to reference the target system with
host: # The IP address or DNS name of the remote host
user: # The user to log in as
passwd: # The password to log in with
# Optional parameters
port: # The target system's ssh port number
sudo: # Boolean to run command via sudo
priv: # File path to ssh private key, defaults to salt-ssh.rsa
timeout: # Number of seconds to wait for response when establishing a
SSH connection
thin_dir: # The target system's storage directory for Salt components.
Defaults to /tmp/salt-<hash>.
port: # The target system's ssh port number
sudo: # Boolean to run command via sudo
priv: # File path to ssh private key, defaults to salt-ssh.rsa
timeout: # Number of seconds to wait for response when establishing
# an SSH connection
timeout: # Number of seconds to wait for response
minion_opts: # Dictionary of minion opts
thin_dir: # The target system's storage directory for Salt
# components. Defaults to /tmp/salt-<hash>.
thin_dir
--------
Salt needs to upload a standalone environment to the target system, and this
defaults to /tmp/salt-<hash>. This directory will be cleaned up per normal
defaults to /tmp/salt-<hash>. This directory will be cleaned up per normal
systems operation.
If you need a persistent Salt environment, for instance to set persistent grains,

View file

@ -66,7 +66,7 @@ Limitations
===========
The 2014.7 release of RAET is not complete! The Syndic and Multi Master have
not been completed yet and these are slated for completion in the 2015.2.0
not been completed yet and these are slated for completion in the 2015.5.0
release.
Also, Salt-Raet allows for more control over the client but these hooks have

View file

@ -12,7 +12,7 @@ LXC Management with Salt
.. warning::
Some features are only currently available in the ``develop`` branch, and
are new in the upcoming 2015.2.0 release. These new features will be
are new in the upcoming 2015.5.0 release. These new features will be
clearly labeled.
@ -110,19 +110,19 @@ another whole profile that differs in just one value.
.. note::
In the 2014.7.x release cycle and earlier, container profiles are defined
under ``lxc.profile``. This parameter will still work in version 2015.2.0,
under ``lxc.profile``. This parameter will still work in version 2015.5.0,
but is deprecated and will be removed in a future release. Please note
however that the profile merging feature described above will only work
with profiles defined under ``lxc.container_profile``, and only in versions
2015.2.0 and later.
2015.5.0 and later.
Additionally, in version 2015.2.0 container profiles have been expanded to
Additionally, in version 2015.5.0 container profiles have been expanded to
support passing template-specific CLI options to :mod:`lxc.create
<salt.modules.lxc.create>`. Below is a table describing the parameters which
can be configured in container profiles:
================== ================== ====================
Parameter 2015.2.0 and Newer 2014.7.x and Earlier
Parameter 2015.5.0 and Newer 2014.7.x and Earlier
================== ================== ====================
*template*:sup:`1` Yes Yes
*options*:sup:`1` Yes No
@ -193,11 +193,11 @@ profile, while those minions without the above Pillar data would use the
.. note::
In the 2014.7.x release cycle and earlier, network profiles are defined
under ``lxc.nic``. This parameter will still work in version 2015.2.0, but
under ``lxc.nic``. This parameter will still work in version 2015.5.0, but
is deprecated and will be removed in a future release. Please note however
that the profile merging feature described above will only work with
profiles defined under ``lxc.network_profile``, and only in versions
2015.2.0 and later.
2015.5.0 and later.
The following are parameters which can be configured in network profiles. These
will directly correspond to a parameter in an LXC configuration file (see ``man
@ -263,7 +263,7 @@ container, with three values:
3. **arch** - CPU architecture (i.e. ``amd64`` or ``i386``)
The :mod:`lxc.images <salt.modules.lxc.images>` function (new in version
2015.2.0) can be used to list the available images. Alternatively, the releases
2015.5.0) can be used to list the available images. Alternatively, the releases
can be viewed on http://images.linuxcontainers.org/images/. The images are
organized in such a way that the **dist**, **release**, and **arch** can be
determined using the following URL format:
@ -407,11 +407,11 @@ Running Commands Within a Container
For containers which are not running their own Minion, commands can be run
within the container in a manner similar to using (:mod:`cmd.run
<salt.modules.cmdmod.run`). The means of doing this have been changed
significantly in version 2015.2.0 (though the deprecated behavior will still be
significantly in version 2015.5.0 (though the deprecated behavior will still be
supported for a few releases). Both the old and new usage are documented
below.
2015.2.0 and Newer
2015.5.0 and Newer
------------------
New functions have been added to mimic the behavior of the functions in the
@ -467,7 +467,7 @@ To run a command and return all information:
Container Management Using States
=================================
Several states are being renamed or otherwise modified in version 2015.2.0. The
Several states are being renamed or otherwise modified in version 2015.5.0. The
information in this tutorial refers to the new states. For
2014.7.x and earlier, please refer to the :mod:`documentation for the LXC
states <salt.states.lxc>`.

View file

@ -3,7 +3,7 @@
'''
Provide authentication using YubiKey.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:depends: yubico-client Python module

View file

@ -2,7 +2,7 @@
'''
Beacon to monitor disk usage.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
'''
# Import Python libs

View file

@ -2,7 +2,7 @@
'''
Beacon to monitor statistics from ethernet adapters
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
'''
# Import Python libs

View file

@ -581,6 +581,7 @@ class Single(object):
fsclient=None,
thin=None,
mine=False,
minion_opts=None,
**kwargs):
# Get mine setting and mine_functions if defined in kwargs (from roster)
self.mine = mine
@ -627,12 +628,15 @@ class Single(object):
'sudo': sudo,
'tty': tty,
'mods': self.mods}
self.minion_config = yaml.dump(
{
self.minion_opts = opts.get('ssh_minion_opts', {})
if minion_opts is not None:
self.minion_opts.update(minion_opts)
self.minion_opts.update({
'root_dir': os.path.join(self.thin_dir, 'running_data'),
'id': self.id,
'sock_dir': '/',
}, width=1000).strip()
})
self.minion_config = yaml.dump(self.minion_opts)
self.target = kwargs
self.target.update(args)
self.serial = salt.payload.Serial(opts)
@ -745,6 +749,7 @@ class Single(object):
self.opts,
self.id,
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
opts_pkg = pre_wrapper['test.opts_pkg']()
opts_pkg['file_roots'] = self.opts['file_roots']
@ -802,6 +807,7 @@ class Single(object):
opts,
self.id,
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context)
wrapper.wfuncs = self.wfuncs
@ -859,7 +865,10 @@ class Single(object):
debug = '1'
arg_str = '''
OPTIONS = OBJ()
OPTIONS.config = '{0}'
OPTIONS.config = \
"""
{0}
"""
OPTIONS.delimiter = '{1}'
OPTIONS.saltdir = '{2}'
OPTIONS.checksum = '{3}'

View file

@ -35,6 +35,7 @@ class FunctionWrapper(object):
fsclient=None,
cmd_prefix=None,
aliases=None,
minion_opts=None,
**kwargs):
super(FunctionWrapper, self).__init__()
self.cmd_prefix = cmd_prefix
@ -48,6 +49,7 @@ class FunctionWrapper(object):
self.aliases = aliases
if self.aliases is None:
self.aliases = {}
self.minion_opts = minion_opts
def __contains__(self, key):
'''
@ -81,6 +83,7 @@ class FunctionWrapper(object):
fsclient=self.fsclient,
cmd_prefix=cmd,
aliases=self.aliases,
minion_opts=self.minion_opts,
**kwargs)
if self.cmd_prefix:
@ -108,6 +111,7 @@ class FunctionWrapper(object):
mods=self.mods,
wipe=True,
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.kwargs
)
stdout, stderr, _ = single.cmd_block()

View file

@ -3,7 +3,7 @@
'''
Wrapper function for mine operations for salt-ssh
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
'''
# Import python libs

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Salt-ssh wrapper functions for the publish module.

View file

@ -515,7 +515,7 @@ def show_top():
def single(fun, name, test=None, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Execute a single state function with the named kwargs, returns False if
insufficient data is sent to the command

View file

@ -785,6 +785,8 @@ DEFAULT_MINION_OPTS = {
'recon_max': 10000,
'recon_default': 1000,
'recon_randomize': True,
'syndic_log_file': os.path.join(salt.syspaths.LOGS_DIR, 'syndic'),
'syndic_pidfile': os.path.join(salt.syspaths.PIDFILE_DIR, 'salt-syndic.pid'),
'random_reauth_delay': 10,
'win_repo_cachefile': 'salt://win/repo/winrepo.p',
'pidfile': os.path.join(salt.syspaths.PIDFILE_DIR, 'salt-minion.pid'),
@ -849,6 +851,7 @@ DEFAULT_MASTER_OPTS = {
'pillar_roots': {
'base': [salt.syspaths.BASE_PILLAR_ROOTS_DIR],
},
'file_client': 'local',
'gitfs_remotes': [],
'gitfs_mountpoint': '',
'gitfs_root': '',
@ -1437,6 +1440,7 @@ def syndic_config(master_config_path,
'autosign_file', 'autoreject_file', 'token_dir'
]
for config_key in ('log_file', 'key_logfile'):
# If this is not a URI and instead a local path
if urlparse(opts.get(config_key, '')).scheme == '':
prepend_root_dirs.append(config_key)
prepend_root_dir(opts, prepend_root_dirs)

View file

@ -446,12 +446,12 @@ def install(name=None,
install_recommends
Whether to install the packages marked as recommended. Default is True.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
only_upgrade
Only upgrade the packages, if they are already installed. Default is False.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Returns a dict containing the new package names and versions::
@ -598,7 +598,7 @@ def _uninstall(action='remove', name=None, pkgs=None, **kwargs):
def autoremove(list_only=False):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Remove packages not required by another package using ``apt-get
autoremove``.

View file

@ -184,7 +184,7 @@ def gunzip(gzipfile, template=None, runas=None):
@salt.utils.decorators.which('zip')
def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
In versions 2014.7.x and earlier, this function was known as
``archive.zip``.
@ -226,7 +226,7 @@ def cmd_zip(zip_file, sources, template=None, cwd=None, runas=None):
Create the zip file as the specified user. Defaults to the user under
which the minion is running.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -252,7 +252,7 @@ def zip_(zip_file, sources, template=None, cwd=None, runas=None):
'''
Uses the ``zipfile`` Python module to create zip files
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
This function was rewritten to use Python's native zip file support.
The old functionality has been preserved in the new function
:mod:`archive.cmd_zip <salt.modules.archive.cmd_zip>`. For versions
@ -389,7 +389,7 @@ def zip_(zip_file, sources, template=None, cwd=None, runas=None):
def cmd_unzip(zip_file, dest, excludes=None,
template=None, options=None, runas=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
In versions 2014.7.x and earlier, this function was known as
``archive.unzip``.
@ -429,7 +429,7 @@ def cmd_unzip(zip_file, dest, excludes=None,
Unpack the zip file as the specified user. Defaults to the user under
which the minion is running.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -461,7 +461,7 @@ def unzip(zip_file, dest, excludes=None, template=None, runas=None):
'''
Uses the ``zipfile`` Python module to unpack zip files
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
This function was rewritten to use Python's native zip file support.
The old functionality has been preserved in the new function
:mod:`archive.cmd_unzip <salt.modules.archive.cmd_unzip>`. For versions

View file

@ -2,7 +2,7 @@
'''
Connection module for Amazon DynamoDB
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
:configuration: This module accepts explicit DynamoDB credentials but can also
utilize IAM roles assigned to the instance trough Instance Profiles.

View file

@ -2,7 +2,7 @@
'''
Cassandra Database Module
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:depends: DataStax Python Driver for Apache Cassandra
https://github.com/datastax/python-driver

View file

@ -709,7 +709,7 @@ def shell(cmd,
'''
Execute the passed command and return the output as a string.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
************************************************************
WARNING: This passes the cmd argument directly to the shell
@ -1577,7 +1577,7 @@ def shells():
'''
Lists the valid shells on this system via the /etc/shells file
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example::

View file

@ -235,7 +235,7 @@ def get(key, default='', delimiter=':', merge=None):
The ``:`` (colon) is used to represent a nested dictionary level.
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
The ``delimiter`` argument was added, to allow delimiters other than
``:`` to be used.
@ -254,13 +254,13 @@ def get(key, default='', delimiter=':', merge=None):
**Arguments**
delimiter
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Override the delimiter used to separate nested levels of a data
structure.
merge
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
If passed, this parameter will change the behavior of the function so
that, instead of traversing each data store above in order and

View file

@ -2,7 +2,7 @@
'''
Manage Perl modules using CPAN
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
'''
from __future__ import absolute_import

View file

@ -1871,7 +1871,7 @@ def load(imagepath):
def save(image, filename):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Save the specified image to filename from docker
e.g. `docker save image > filename`

View file

@ -1634,7 +1634,7 @@ def replace(path,
if prepend_if_not_found or append_if_not_found:
# Search for content, so we don't continue pre/appending
# the content if it's been pre/appended in a previous run.
if re.search(content, line):
if re.search('^{0}$'.format(content), line):
# Content was found, so set found.
found = True
@ -4780,7 +4780,7 @@ def normpath(path):
'''
Returns Normalize path, eliminating double slashes, etc.
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
This can be useful at the CLI but is frequently useful when scripting.
@ -4801,7 +4801,7 @@ def basename(path):
'''
Returns the final component of a pathname
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
This can be useful at the CLI but is frequently useful when scripting.
@ -4822,7 +4822,7 @@ def dirname(path):
'''
Returns the directory component of a pathname
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
This can be useful at the CLI but is frequently useful when scripting.

View file

@ -3,7 +3,7 @@
Manage a GPG keychains, add keys, create keys, retrieve keys
from keyservers. Sign, encrypt and sign & encrypt text and files.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. note::

View file

@ -424,7 +424,7 @@ def filter_by(lookup_dict, grain='os_family', merge=None, default='default', bas
each case to be collected in the base and overridden by the grain
selection dictionary and the merge dictionary. Default is unset.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:

View file

@ -172,7 +172,7 @@ def pull(cwd, opts=None, user=None, identity=None, repository=None):
identity : None
Private SSH key on the minion server for authentication (ssh://)
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -242,7 +242,7 @@ def clone(cwd, repository, opts=None, user=None, identity=None):
identity : None
Private SSH key on the minion server for authentication (ssh://)
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:

View file

@ -2,7 +2,7 @@
'''
Module for sending messages to hipchat.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:configuration: This module can be used by either passing an api key and version
directly or by specifying both in a configuration profile in the salt

View file

@ -3,7 +3,7 @@
Module for making various web calls. Primarily designed for webhooks and the
like, but also useful for basic http testing.
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
'''
from __future__ import absolute_import

View file

@ -219,7 +219,7 @@ def gen_locale(locale, **kwargs):
log.error('The provided locale "{0}" is not found in {1}'.format(locale, search))
return False
if on_debian or on_gentoo:
if os.path.exists('/etc/locale.gen'):
__salt__['file.replace'](
'/etc/locale.gen',
r'^#\s*{0}$'.format(locale),

View file

@ -346,7 +346,7 @@ def cloud_init_interface(name, vm_=None, **kwargs):
def get_container_profile(name=None, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Gather a pre-configured set of container configuration parameters. If no
arguments are passed, an empty profile is returned.
@ -427,7 +427,7 @@ def get_container_profile(name=None, **kwargs):
def get_network_profile(name=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Gather a pre-configured set of network configuration parameters. If no
arguments are passed, the following default profile is returned:
@ -957,7 +957,7 @@ def init(name,
memory
cgroups memory limit, in MB
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
If no value is passed, no limit is set. In earlier Salt versions,
not passing this value causes a 1024MB memory limit to be set, and
it was necessary to pass ``memory=0`` to set no limit.
@ -973,10 +973,10 @@ def init(name,
network_profile
Network profile to use for the container
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
nic
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use ``network_profile`` instead
nic_opts
@ -1001,7 +1001,7 @@ def init(name,
Set to ``True`` to denote a password hash instead of a plaintext
password
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
profile
A LXC profile (defined in config or pillar).
@ -1037,7 +1037,7 @@ def init(name,
Attempt to request key approval from the master. Default: ``True``
clone
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use ``clone_from`` instead
clone_from
@ -1048,7 +1048,7 @@ def init(name,
Delay in seconds between end of container creation and bootstrapping.
Useful when waiting for container to obtain a DHCP lease.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
bootstrap_url
See lxc.bootstrap
@ -1441,7 +1441,7 @@ def cloud_init(name, vm_=None, **kwargs):
def images(dist=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
List the available images for LXC's ``download`` template.
@ -1492,7 +1492,7 @@ def images(dist=None):
def templates():
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
List the available LXC template scripts installed on the minion
@ -1535,7 +1535,7 @@ def create(name,
network_profile
Network profile to use for container
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
**Container Creation Arguments**
@ -1815,7 +1815,7 @@ def ls_(active=None, cache=True):
active
If ``True``, return only active (i.e. running) containers
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -1855,7 +1855,7 @@ def list_(extra=False, limit=None):
Return output matching a specific state (**frozen**, **running**, or
**stopped**).
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Examples:
@ -1987,7 +1987,7 @@ def _ensure_running(name, no_start=False):
def restart(name, force=False):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Restart the named container. If the container was not running, the
container will merely be started.
@ -2021,7 +2021,7 @@ def start(name, **kwargs):
Start the named container
restart : False
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use :mod:`lxc.restart <salt.modules.lxc.restart>`
Restart the container if it is already running
@ -2056,7 +2056,7 @@ def stop(name, kill=False):
Older LXC versions will stop containers like this irrespective of this
argument.
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
Default value changed to ``False``
CLI Example:
@ -2088,7 +2088,7 @@ def freeze(name, **kwargs):
If ``True`` and the container is stopped, the container will be started
before attempting to freeze.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -2143,7 +2143,7 @@ def destroy(name, stop=False):
If ``True``, the container will be destroyed even if it is
running/frozen.
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
Default value changed to ``False``. This more closely matches the
behavior of ``lxc-destroy(1)``, and also makes it less likely that
an accidental command will destroy a running container that was
@ -2399,7 +2399,7 @@ def info(name):
def set_password(name, users, password, encrypted=True):
'''
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
Function renamed from ``set_pass`` to ``set_password``. Additionally,
this function now supports (and defaults to using) a password hash
instead of a plaintext password.
@ -2417,7 +2417,7 @@ def set_password(name, users, password, encrypted=True):
If true, ``password`` must be a password hash. Set to ``False`` to set
a plaintext password (not recommended).
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -2555,7 +2555,7 @@ def update_lxc_conf(name, lxc_conf, lxc_conf_unset):
def set_dns(name, dnsservers=None, searchdomains=None):
'''
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
The ``dnsservers`` and ``searchdomains`` parameters can now be passed
as a comma-separated list.
@ -2693,7 +2693,7 @@ def bootstrap(name,
Delay in seconds between end of container creation and bootstrapping.
Useful when waiting for container to obtain a DHCP lease.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
bootstrap_url
url, content or filepath to the salt bootstrap script
@ -2926,7 +2926,7 @@ def run_cmd(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use :mod:`lxc.run <salt.modules.lxc.run>` instead
'''
salt.utils.warn_until(
@ -2967,7 +2967,7 @@ def run(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Run :mod:`cmd.run <salt.modules.cmdmod.run>` within a container
@ -3042,7 +3042,7 @@ def run_stdout(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Run :mod:`cmd.run_stdout <salt.modules.cmdmod.run_stdout>` within a container
@ -3117,7 +3117,7 @@ def run_stderr(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Run :mod:`cmd.run_stderr <salt.modules.cmdmod.run_stderr>` within a container
@ -3190,7 +3190,7 @@ def retcode(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Run :mod:`cmd.retcode <salt.modules.cmdmod.retcode>` within a container
@ -3265,7 +3265,7 @@ def run_all(name,
ignore_retcode=False,
keep_env='http_proxy,https_proxy,no_proxy'):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Run :mod:`cmd.run_all <salt.modules.cmdmod.run_all>` within a container
@ -3363,7 +3363,7 @@ def copy_to(name, source, dest, overwrite=False, makedirs=False):
dest
Destination on the container. Must be an absolute path.
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
If the destination is a directory, the file will be copied into
that directory.
@ -3378,7 +3378,7 @@ def copy_to(name, source, dest, overwrite=False, makedirs=False):
Create the parent directory on the container if it does not already
exist.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -3761,7 +3761,7 @@ def reconfigure(name,
def apply_network_profile(name, network_profile, nic_opts=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Apply a network profile to a container

View file

@ -765,7 +765,7 @@ def umount(name, device=None, user=None):
salt '*' mount.umount /mnt/foo
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
salt '*' mount.umount /mnt/foo /dev/xvdc1
'''

View file

@ -80,7 +80,7 @@ def ping(host, timeout=False, return_boolean=False):
salt '*' network.ping archlinux.org
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Return a True or False instead of ping output.

View file

@ -92,7 +92,7 @@ def items(*args, **kwargs):
will also override any variables of the same name in pillar or
ext_pillar.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -195,7 +195,7 @@ def item(*args, **kwargs):
will also override any variables of the same name in pillar or
ext_pillar.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Examples:
@ -252,7 +252,7 @@ def ext(external, pillar=None):
will also override any variables of the same name in pillar or
ext_pillar.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -955,7 +955,7 @@ def upgrade_available(pkg,
user=None,
cwd=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Check whether or not an upgrade is available for a given package
@ -973,7 +973,7 @@ def upgrade(bin_env=None,
cwd=None,
use_vt=False):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Upgrades outdated pip packages

View file

@ -2,7 +2,7 @@
'''
Module for retrieving random information from Random.org
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:configuration: This module can be used by either passing an api key and version
directly or by specifying both in a configuration profile in the salt

View file

@ -136,7 +136,7 @@ def modified(*packages, **flags):
List the modified files that belong to a package. Not specifying any packages
will return a list of _all_ modified files on the system's RPM database.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI examples:

View file

@ -2,7 +2,7 @@
'''
Module for sending messages to Slack
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:configuration: This module can be used by either passing an api key and version
directly or by specifying both in a configuration profile in the salt

View file

@ -2,7 +2,7 @@
'''
Module for interop with the Splunk API
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
:depends: - splunk-sdk python module
:configuration: Configure this module by specifying the name of a configuration

View file

@ -272,7 +272,7 @@ def template_str(tem, queue=False, **kwargs):
def apply_(mods=None,
**kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Apply states! This function will call highstate or state.sls based on the
arguments passed in, state.apply is intended to be the main gateway for
@ -294,7 +294,7 @@ def apply_(mods=None,
def request(mods=None,
**kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Request that the local admin execute a state run via
`salt-call state.run_request`
@ -335,7 +335,7 @@ def request(mods=None,
def check_request(name=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Return the state request information, if any
@ -358,7 +358,7 @@ def check_request(name=None):
def clear_request(name=None):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Clear out the state execution request without executing it
@ -399,7 +399,7 @@ def clear_request(name=None):
def run_request(name='default', **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Execute the pending state request

View file

@ -54,7 +54,7 @@ def doc(*args):
Modules can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -112,7 +112,7 @@ def state_doc(*args):
State names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -182,7 +182,7 @@ def runner_doc(*args):
Runner names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -240,7 +240,7 @@ def returner_doc(*args):
Returner names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -287,7 +287,7 @@ def renderer_doc(*args):
Multiple renderers can be specified.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -337,7 +337,7 @@ def list_functions(*args, **kwargs): # pylint: disable=unused-argument
Function names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -375,7 +375,7 @@ def list_modules(*args):
'''
List the modules loaded on the minion
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -438,7 +438,7 @@ def argspec(module=''):
Module names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -453,7 +453,7 @@ def state_argspec(module=''):
Return the argument specification of functions in Salt state
modules.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -479,7 +479,7 @@ def returner_argspec(module=''):
Return the argument specification of functions in Salt returner
modules.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -505,7 +505,7 @@ def runner_argspec(module=''):
Return the argument specification of functions in Salt runner
modules.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -542,7 +542,7 @@ def list_state_functions(*args, **kwargs): # pylint: disable=unused-argument
State function names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -592,7 +592,7 @@ def list_state_modules(*args):
State module names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -634,7 +634,7 @@ def list_runners(*args):
Runner names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -677,7 +677,7 @@ def list_runner_functions(*args, **kwargs): # pylint: disable=unused-argument
Runner function names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -726,7 +726,7 @@ def list_returners(*args):
Returner names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -770,7 +770,7 @@ def list_returner_functions(*args, **kwargs): # pylint: disable=unused-argument
Returner names can be specified as globs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash
@ -810,7 +810,7 @@ def list_renderers(*args):
'''
List the renderers loaded on the minion
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:

View file

@ -5,7 +5,7 @@ System Profiler Module
Interface with Mac OSX's command-line System Profiler utility to get
information about package receipts and installed applications.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
'''

View file

@ -67,7 +67,7 @@ def enable(profile='allprofiles'):
'''
Enable firewall profile :param profile: (default: allprofiles)
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -81,7 +81,7 @@ def enable(profile='allprofiles'):
def get_rule(name="all"):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Get firewall rule(s) info
@ -103,7 +103,7 @@ def get_rule(name="all"):
def add_rule(name, localport, protocol="tcp", action="allow", dir="in"):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Add a new firewall rule

View file

@ -2,18 +2,16 @@
'''
Manage groups on Windows
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
from salt.ext.six import string_types
try:
import win32com.client
import win32security
import pythoncom
import pywintypes
import wmi
HAS_DEPENDENCIES = True
except ImportError:
HAS_DEPENDENCIES = False
@ -51,30 +49,19 @@ def add(name, gid=None, system=False):
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
try:
ldapProvider = False
if "dc=" in name.lower():
compObj = nt.GetObject('', 'LDAP://' + name[(name.find(',') + 1):len(name)])
addGroupName = name[0:(name.find(','))]
ldapProvider = True
else:
compObj = nt.GetObject('', 'WinNT://.,computer')
addGroupName = name
newGroup = compObj.Create('group', addGroupName)
if ldapProvider:
newGroup.sAMAccountName = addGroupName.replace('cn=', '').replace('CN=', '')
compObj = nt.GetObject('', 'WinNT://.,computer')
newGroup = compObj.Create('group', name)
newGroup.SetInfo()
ret['changes'].append((
'Successfully created group {0}'
).format(name))
except pywintypes.com_error as com_err:
friendly_error = ''
ret['result'] = False
if len(com_err.excepinfo) >= 2:
if com_err.excepinfo[2]:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['comment'] = (
'Failed to create group {0}. {1}'
).format(name, friendly_error)
ret['result'] = False
else:
ret['result'] = None
ret['comment'] = (
@ -103,23 +90,16 @@ def delete(name):
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
try:
if "dc=" in name.lower():
compObj = nt.GetObject('', 'LDAP://' + name[(name.find(',') + 1):len(name)])
delGroupName = name[0:(name.find(','))]
else:
compObj = nt.GetObject('', 'WinNT://.,computer')
delGroupName = name
compObj.Delete('group', delGroupName)
compObj = nt.GetObject('', 'WinNT://.,computer')
compObj.Delete('group', name)
ret['changes'].append(('Successfully removed group {0}').format(name))
except pywintypes.com_error as com_err:
friendly_error = ''
ret['result'] = False
if len(com_err.excepinfo) >= 2:
if com_err.excepinfo[2]:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['comment'] = (
'Failed to remove group {0}. {1}'
).format(name, friendly_error)
ret['result'] = False
else:
ret['result'] = None
ret['comment'] = (
@ -143,21 +123,13 @@ def info(name):
nt = win32com.client.Dispatch('AdsNameSpaces')
try:
if "dc=" in name.lower():
groupObj = nt.GetObject('', 'LDAP://' + name)
gr_name = groupObj.cn
gr_mem = []
for member in groupObj.members():
gr_mem.append(member.distinguishedName)
else:
name = name[(name.find('\\') + 1):]
groupObj = nt.GetObject('', 'WinNT://./' + name + ',group')
gr_name = groupObj.Name
gr_mem = []
for member in groupObj.members():
gr_mem.append(
_getnetbiosusernamefromsid(member.AdsPath))
gid = win32security.ConvertSidToStringSid(pywintypes.SID(groupObj.objectSID))
groupObj = nt.GetObject('', 'WinNT://./' + name + ',group')
gr_name = groupObj.Name
gr_mem = []
for member in groupObj.members():
gr_mem.append(
member.ADSPath.replace('WinNT://', '').replace(
'/', '\\').encode('ascii', 'backslashreplace'))
except pywintypes.com_error:
return False
@ -166,7 +138,7 @@ def info(name):
return {'name': gr_name,
'passwd': None,
'gid': gid,
'gid': None,
'members': gr_mem}
@ -191,11 +163,16 @@ def getent(refresh=False):
results = nt.GetObject('', 'WinNT://.')
results.Filter = ['group']
for result in results:
if 'dc=' in result.AdsPath.lower():
ret.append(info(result.distinguishedName))
else:
ret.append(info(result.name))
member_list = []
for member in result.members():
member_list.append(
member.AdsPath.replace('WinNT://', '').replace(
'/', '\\').encode('ascii', 'backslashreplace'))
group = {'gid': __salt__['file.group_to_gid'](result.name),
'members': member_list,
'name': result.name,
'passwd': 'x'}
ret.append(group)
__context__['group.getent'] = ret
return ret
@ -219,52 +196,33 @@ def adduser(name, username):
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
groupObj = nt.GetObject('', 'WinNT://./' + name + ',group')
existingMembers = []
for member in groupObj.members():
existingMembers.append(
member.ADSPath.replace('WinNT://', '').replace(
'/', '\\').encode('ascii', 'backslashreplace').lower())
current_info = info(name)
if current_info:
if 'dc=' in name.lower():
groupObj = nt.GetObject('', 'LDAP://' + name)
try:
if __fixlocaluser(username.lower()) not in existingMembers:
if not __opts__['test']:
groupObj.Add('WinNT://' + username.replace('\\', '/'))
ret['changes']['Users Added'].append(username)
else:
groupObj = nt.GetObject('', 'WinNT://./' + current_info['name'] + ',group')
username = _fixlocaluser(username)
try:
if username.lower() not in [x.lower() for x in current_info['members']]:
if 'dc=' in username.lower():
groupObj.Add('LDAP://' + username)
else:
# have to use a different ADSPath when adding/removing users to Domain Groups...
with salt.utils.winapi.Com():
c = wmi.WMI()
for wmiComp in c.Win32_ComputerSystem():
if wmiComp.DomainRole < 4:
groupObj.Add('WinNT://' + username.replace('\\', '/'))
else:
groupObj.Add(
nt.GetObject(
'', 'WinNT://./' + username[(
username.find('\\') + 1):]).AdsPath)
ret['changes']['Users Added'].append(username)
else:
ret['comment'] = (
'User {0} is already a member of {1}'
).format(username, name)
ret['result'] = None
except pywintypes.com_error as com_err:
friendly_error = ''
if len(com_err.excepinfo) >= 2:
if com_err.excepinfo[2]:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['comment'] = (
'Failed to add {0} to group {1}. {2}'
).format(username, name, friendly_error)
ret['result'] = False
else:
'User {0} is already a member of {1}'
).format(username, name)
ret['result'] = None
except pywintypes.com_error as com_err:
if len(com_err.excepinfo) >= 2:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['comment'] = (
'Failed to add {0} to group {1}. {2}'
).format(username, name, friendly_error)
ret['result'] = False
ret['comment'] = ((
'Group {0} does not appear to exist'
).format(name))
return ret
return ret
@ -287,51 +245,32 @@ def deluser(name, username):
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
groupObj = nt.GetObject('', 'WinNT://./' + name + ',group')
existingMembers = []
for member in groupObj.members():
existingMembers.append(
member.ADSPath.replace('WinNT://', '').replace(
'/', '\\').encode('ascii', 'backslashreplace').lower())
try:
current_info = info(name)
if current_info:
if 'dc=' in name.lower():
groupObj = nt.GetObject('', 'LDAP://' + name)
else:
groupObj = nt.GetObject('', 'WinNT://./' + current_info['name'] + ',group')
if __fixlocaluser(username.lower()) in existingMembers:
if not __opts__['test']:
groupObj.Remove('WinNT://' + username.replace('\\', '/'))
username = _fixlocaluser(username)
if username.lower() in [x.lower() for x in current_info['members']]:
if 'dc=' in username.lower():
groupObj.Remove('LDAP://' + username)
else:
# have to use a different ADSPath when adding/removing users to Domain Groups...
with salt.utils.winapi.Com():
c = wmi.WMI()
for wmiComp in c.Win32_ComputerSystem():
if wmiComp.DomainRole < 4:
groupObj.Remove('WinNT://' + username.replace('\\', '/'))
else:
groupObj.Remove(
nt.GetObject('', 'WinNT://./' + username[(
username.find('\\') + 1):]).AdsPath)
ret['changes']['Users Removed'].append(username)
else:
ret['comment'] = (
'User {0} is not a member of {1}'
).format(username, name)
ret['result'] = None
ret['changes']['Users Removed'].append(username)
else:
ret['comment'] = (
'Group {0} does not appear to exist.'
).format(name)
ret['result'] = False
'User {0} is not a member of {1}'
).format(username, name)
ret['result'] = None
except pywintypes.com_error as com_err:
friendly_error = ''
if len(com_err.excepinfo) >= 2:
if com_err.excepinfo[2]:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['comment'] = (
'Failed to remove {0} from group {1}. {2}'
).format(username, name, friendly_error)
ret['result'] = False
return ret
return ret
@ -346,10 +285,6 @@ def members(name, members_list):
salt '*' group.members foo 'user1,user2,user3'
if using LDAP DNs, usernames must be separated with a ", "
salt '*' group.members name='cn=foo,dc=domain,dc=com' members_list='cn=user1,cn=Users,dc=domain,dc=com, cn=user2,ou=Test,dc=domain,dc=com'
'''
ret = {'name': name,
@ -357,135 +292,80 @@ def members(name, members_list):
'changes': {'Users Added': [], 'Users Removed': []},
'comment': []}
if isinstance(members_list, string_types):
if 'dc=' in members_list.lower():
members_list = members_list.split(", ")
else:
members_list = [_fixlocaluser(thisMember) for thisMember in members_list.split(",")]
members_list = [__fixlocaluser(thisMember) for thisMember in members_list.lower().split(",")]
if not isinstance(members_list, list):
ret['result'] = False
ret['comment'].append('Members is not a list object')
return ret
current_info = info(name)
if current_info:
if sorted([x.lower() for x in current_info['members']]) == sorted([x.lower() for x in members_list]):
ret['result'] = None
ret['comment'].append(('{0} membership is correct').format(name))
else:
# add missing users
for member in members_list:
if member.lower() not in [x.lower() for x in current_info['members']]:
this_return = adduser(name, member)
if this_return['result']:
ret['changes']['Users Added'] += this_return['changes']['Users Added']
else:
ret['result'] = False
ret['comment'].append(this_return['comment'])
# remove users not in the list
for member in current_info['members']:
if member.lower() not in [x.lower() for x in members_list]:
this_return = deluser(name, member)
if this_return['result']:
ret['changes']['Users Removed'] += this_return['changes']['Users Removed']
else:
ret['result'] = False
ret['comment'].append(this_return['comment'])
else:
ret['comment'] = (
'Group {0} does not appear to exist.'
).format(name)
ret['result'] = False
return ret
def list_groups(useldap=False):
'''
Return a list of groups on Windows
set 'useldap' to True to connect to the local LDAP server
'''
ret = []
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
if useldap:
# try to recurse through the ldap server and get all user objects...
# could do 'LDAP:' and allow any domain member the ability to get all ldap users
# if anonymous binds are allowed, but for now, the code will try to connect to ldap on the local
# host
ret = _recursecontainersforgroups('LDAP://localhost')
else:
results = nt.GetObject('', 'WinNT://.')
results.Filter = ['group']
for result in results:
ret.append(_getnetbiosusernamefromsid(result.AdsPath))
__context__['list_users'] = ret
return ret
def _recursecontainersforgroups(path):
'''
recursively get all group objects in all sub-containers from a top level container
for example:
_recursecontainersfrorgroups('LDAP:')
would find all group objects in a domain via ldap
'''
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
ret = []
results = None
try:
results = nt.GetObject('', path)
groupObj = nt.GetObject('', 'WinNT://./' + name + ',group')
except pywintypes.com_error as com_err:
pass
if len(com_err.excepinfo) >= 2:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['result'] = False
ret['comment'].append((
'Failure accessing group {0}. {1}'
).format(name, friendly_error))
return ret
existingMembers = []
for member in groupObj.members():
existingMembers.append(
member.ADSPath.replace('WinNT://', '').replace(
'/', '\\').encode('ascii', 'backslashreplace').lower())
if results:
for result in results:
if result.Class.lower() == 'group':
ret.append(result.distinguishedName)
else:
ret = ret + (_recursecontainersforgroups(result.AdsPath))
existingMembers.sort()
members_list.sort()
if existingMembers == members_list:
ret['result'] = None
ret['comment'].append(('{0} membership is correct').format(name))
return ret
# add users
for member in members_list:
if member not in existingMembers:
try:
if not __opts__['test']:
groupObj.Add('WinNT://' + member.replace('\\', '/'))
ret['changes']['Users Added'].append(member)
except pywintypes.com_error as com_err:
if len(com_err.excepinfo) >= 2:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['result'] = False
ret['comment'].append((
'Failed to add {0} to {1}. {2}'
).format(member, name, friendly_error))
#return ret
# remove users not in members_list
for member in existingMembers:
if member not in members_list:
try:
if not __opts__['test']:
groupObj.Remove('WinNT://' + member.replace('\\', '/'))
ret['changes']['Users Removed'].append(member)
except pywintypes.com_error as com_err:
if len(com_err.excepinfo) >= 2:
friendly_error = com_err.excepinfo[2].rstrip('\r\n')
ret['result'] = False
ret['comment'].append((
'Failed to remove {0} from {1}. {2}'
).format(member, name, friendly_error))
#return ret
return ret
def _fixlocaluser(username):
def __fixlocaluser(username):
'''
prefixes a username w/o a backslash with the computername or domain name
prefixes a username w/o a backslash with the computername
i.e. _fixlocaluser('Administrator') would return 'computername\administrator'
i.e. __fixlocaluser('Administrator') would return 'computername\administrator'
'''
if 'dc=' not in username.lower():
if '\\' not in username:
try:
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
user_info = win32security.LookupAccountSid(
None, pywintypes.SID(nt.GetObject('', 'WinNT://./' + username).objectSID))
username = (('{0}\\{1}').format(user_info[1], user_info[0]))
except Exception:
username = ('{0}\\{1}').format(__salt__['grains.get']('host').upper(), username)
if '\\' not in username:
username = ('{0}\\{1}').format(__salt__['grains.get']('host'), username)
return username
def _getnetbiosusernamefromsid(adspath):
'''
gets the "domain\\username" of an adspath using the SID
'''
if 'NT AUTHORITY'.upper() in adspath.upper():
return adspath.replace('WinNT://', '').replace('/', '\\')
else:
try:
pythoncom.CoInitialize()
nt = win32com.client.Dispatch('AdsNameSpaces')
user_info = win32security.LookupAccountSid(
None, pywintypes.SID(nt.GetObject('', adspath).objectSID))
return ('{0}\\{1}').format(user_info[1], user_info[0])
except Exception:
return adspath.replace('WinNT://', '').replace('/', '\\')
return username.lower()

View file

@ -304,7 +304,7 @@ def _byte_calc(val):
def master(master=None, connected=True):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Fire an event if the minion gets disconnected from its master. This
function is meant to be run via a scheduled job from the minion. If

File diff suppressed because it is too large Load diff

View file

@ -2034,7 +2034,7 @@ def modified(*packages, **flags):
List the modified files that belong to a package. Not specifying any packages
will return a list of _all_ modified files on the system's RPM database.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Filtering by flags (True or False):
@ -2081,7 +2081,7 @@ def modified(*packages, **flags):
@decorators.which('yumdownloader')
def download(*packages):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Download packages to the local disk. Requires ``yumdownloader`` from
``yum-utils`` package.

View file

@ -158,7 +158,7 @@ def _build_zfs_cmd_list():
def exists(name):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Check if a ZFS filesystem or volume or snapshot exists.
@ -178,7 +178,7 @@ def exists(name):
def create(name, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Create a ZFS File System.
@ -236,7 +236,7 @@ def create(name, **kwargs):
def destroy(name, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Destroy a ZFS File System.
@ -269,7 +269,7 @@ def destroy(name, **kwargs):
def rename(name, new_name):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Rename or Relocate a ZFS File System.
@ -294,7 +294,7 @@ def rename(name, new_name):
def list_(name='', **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Return a list of all datasets or a specified dataset on the system and the
values of their used, available, referenced, and mountpoint properties.

View file

@ -84,7 +84,7 @@ def iostat(name=''):
def list_():
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Return a list of all pools in the system with health status and space usage
@ -190,7 +190,7 @@ def scrub(pool_name=None):
def create(pool_name, *vdevs, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Create a simple zpool, a mirrored zpool, a zpool having nested VDEVs, a hybrid zpool with cache, spare and log drives or a zpool with RAIDZ-1, RAIDZ-2 or RAIDZ-3
@ -409,7 +409,7 @@ def create_file_vdev(size, *vdevs):
def export(*pools, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Export storage pools
@ -452,7 +452,7 @@ def export(*pools, **kwargs):
def import_(pool_name='', new_name='', **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Import storage pools or list pools available for import
@ -504,7 +504,7 @@ def import_(pool_name='', new_name='', **kwargs):
def online(pool_name, *vdevs, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Ensure that the specified devices are online
@ -557,7 +557,7 @@ def online(pool_name, *vdevs, **kwargs):
def offline(pool_name, *vdevs, **kwargs):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Ensure that the specified devices are offline

View file

@ -970,7 +970,7 @@ def modified(*packages, **flags):
List the modified files that belong to a package. Not specifying any packages
will return a list of _all_ modified files on the system's RPM database.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Filtering by flags (True or False):

View file

@ -3,7 +3,7 @@
Display values only, separated by newlines
==========================================
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
This outputter is designed for Salt CLI return data. It will do the following
to the return dict:

View file

@ -18,7 +18,7 @@ to look for Pillar files (such as ``top.sls``).
.. versionchanged:: 2014.7.0
The optional ``root`` parameter will be added.
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
The special branch name '__env__' will be replace by the
environment ({{env}})

View file

@ -162,10 +162,9 @@ def render(gpg_data, saltenv='base', sls='', argline='', **kwargs):
'''
if not HAS_GPG:
raise SaltRenderError('GPG unavailable')
homedir = None
if 'config.get' in __salt__:
homedir = __salt__['config.get']('gpg_keydir', None)
if homedir is None:
homedir = __salt__['config.get']('gpg_keydir', DEFAULT_GPG_KEYDIR)
else:
homedir = __opts__.get('gpg_keydir', DEFAULT_GPG_KEYDIR)
log.debug('Reading GPG keys from: {0}'.format(homedir))
try:

View file

@ -53,7 +53,7 @@ To use the carbon returner, append '--return carbon' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -2,7 +2,7 @@
'''
Return data to a cassandra server
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:maintainer: Corin Kochenower<ckochenower@saltstack.com>
:maturity: new as of 2015.2

View file

@ -25,7 +25,7 @@ To use the couchdb returner, append ``--return couchdb`` to the salt command. Ex
To use the alternative configuration, append ``--return_config alternative`` to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -2,7 +2,7 @@
'''
Return salt data via hipchat.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The following fields can be set in the minion conf file::
@ -60,7 +60,7 @@ To use the HipChat returner, append '--return hipchat' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -30,7 +30,7 @@ To use the memcache returner, append '--return memcache' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -46,7 +46,7 @@ To use the mongo returner, append '--return mongo' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -37,7 +37,7 @@ To use the mongo returner, append '--return mongo' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -109,7 +109,7 @@ To use the mysql returner, append '--return mysql' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -108,7 +108,7 @@ correctly. Replace with equivalent SQL for other ODBC-compliant servers
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -80,7 +80,7 @@ To use the postgres returner, append '--return postgres' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -30,7 +30,7 @@ To use the redis returner, append '--return redis' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -2,7 +2,7 @@
'''
Return salt data via slack
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The following fields can be set in the minion conf file::

View file

@ -3,7 +3,7 @@
'''
Return data by SMS.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
:maintainer: Damian Myerscough
:maturity: new

View file

@ -59,7 +59,7 @@ To use the SMTP returner, append '--return smtp' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -65,7 +65,7 @@ To use the sqlite returner, append '--return sqlite3' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -50,7 +50,7 @@ To use the XMPP returner, append '--return xmpp' to the salt command.
To use the alternative configuration, append '--return_config alternative' to the salt command.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: bash

View file

@ -3,7 +3,7 @@
Use the cloud cache on the master to derive IPv4 addresses based on minion ID.
This roster requires that the minion in question was created using at least the
2015.2.0 version of Salt Cloud. Starting with the 2015.2.0 release, Salt Cloud
2015.5.0 version of Salt Cloud. Starting with the 2015.5.0 release, Salt Cloud
maintains an index of minions that it creates and deletes. This index tracks the
provider and profile configuration used to provision the minion, including
authentication information. So long as this configuration remains current, it can

View file

@ -3,7 +3,7 @@
Module for making various web calls. Primarily designed for webhooks and the
like, but also useful for basic http testing.
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
'''
from __future__ import absolute_import
# Import Python libs

View file

@ -105,7 +105,7 @@ def lookup_jid(jid,
display_progress
Displays progress events when set to `True`. Default: `False`.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:

View file

@ -152,7 +152,7 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
memory
cgroups memory limit, in MB
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
If no value is passed, no limit is set. In earlier Salt versions,
not passing this value causes a 1024MB memory limit to be set, and
it was necessary to pass ``memory=0`` to set no limit.
@ -169,10 +169,10 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
network_profile
Network profile to use for the container
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
nic
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use ``network_profile`` instead
nic_opts
@ -265,7 +265,8 @@ def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs):
expr_form='list', timeout=600).get(host, {})
name = kw.pop('name', name)
# be sure not to seed an already seeded host
kw['seed'] = seeds.get(name, True)
seed = kwargs.get('seed', True)
kw['seed'] = seeds.get(name, seed)
if not kw['seed']:
kw.pop('seed_cmd', '')
cmds.append(

View file

@ -126,7 +126,7 @@ def orchestrate_single(fun, name, test=None, queue=False, pillar=None, **kwargs)
'''
Execute a single state orchestration routine
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:
@ -156,7 +156,7 @@ def orchestrate_high(data, test=None, queue=False, pillar=None, **kwargs):
'''
Execute a single state orchestration routine
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
CLI Example:

View file

@ -7,7 +7,7 @@ etcd Database Module
:depends: python-etcd
:platform: all
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
This module allows access to the etcd database using an ``sdb://`` URI. This
package is located at ``https://pypi.python.org/pypi/python-etcd``.

View file

@ -3,7 +3,7 @@
Manage DynamoDB Tables
=================
.. versionadded:: 2015.2
.. versionadded:: 2015.5.0
Create and destroy DynamoDB tables. Be aware that this interacts with Amazon's
services, and so may incur charges.

View file

@ -1585,7 +1585,7 @@ def directory(name,
- mode
- ignore_dirs
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
dir_mode / mode
The permissions mode to set any directories created. Not supported on
@ -3517,35 +3517,35 @@ def copy(
If the target subdirectories don't exist create them
preserve
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Set ``preserve: True`` to preserve user/group ownership and mode
after copying. Default is ``False``. If ``preseve`` is set to ``True``,
then user/group/mode attributes will be ignored.
user
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The user to own the copied file, this defaults to the user salt is
running as on the minion. If ``preserve`` is set to ``True``, then
this will be ignored
group
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The group to own the copied file, this defaults to the group salt is
running as on the minion. If ``preserve`` is set to ``True`` or on
Windows this will be ignored
mode
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
The permissions to set on the copied file, aka 644, '0775', '4664'.
If ``preserve`` is set to ``True``, then this will be ignored.
Not supported on Windows
subdir
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
If the name is a directory then place the file inside the named
directory

View file

@ -70,7 +70,7 @@ def latest(name,
identity
Private SSH key on the minion server for authentication (ssh://)
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
force
Force hg to clone into pre-existing directories (deletes contents)

View file

@ -5,7 +5,7 @@ Send a message to Hipchat
This state is useful for sending messages to Hipchat during state runs.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: yaml

View file

@ -28,7 +28,7 @@ def present(name,
vgname=None,
lvname=None):
'''
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
The :mod:`lxc.created <salt.states.lxc.created>` state has been renamed
to ``lxc.present``, and the :mod:`lxc.cloned <salt.states.lxc.cloned>`
state has been merged into this state.
@ -44,7 +44,7 @@ def present(name,
* If ``None``, do nothing with regards to the running state of the
container
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
clone_from
Create named container as a clone of the specified container
@ -76,7 +76,7 @@ def present(name,
<salt.modules.lxc.images>` function.
options
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Template-specific options to pass to the lxc-create command. These
correspond to the long options (ones beginning with two dashes) that
@ -329,7 +329,7 @@ def absent(name):
# Container state (running/frozen/stopped)
def running(name, restart=False):
'''
.. versionchanged:: 2015.2.0
.. versionchanged:: 2015.5.0
The :mod:`lxc.started <salt.states.lxc.started>` state has been renamed
to ``lxc.running``
@ -423,7 +423,7 @@ def running(name, restart=False):
def frozen(name, start=True):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Ensure that a container is frozen
@ -522,7 +522,7 @@ def stopped(name, kill=False):
Older LXC versions will stop containers like this irrespective of this
argument.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. code-block:: yaml
@ -577,7 +577,7 @@ def stopped(name, kill=False):
# Deprecated states
def created(name, **kwargs):
'''
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use :mod:`lxc.present <salt.states.lxc.present>`
'''
salt.utils.warn_until(
@ -590,7 +590,7 @@ def created(name, **kwargs):
def started(name, restart=False):
'''
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use :mod:`lxc.running <salt.states.lxc.running>`
'''
salt.utils.warn_until(
@ -608,7 +608,7 @@ def cloned(name,
vgname=None,
profile=None):
'''
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
Use :mod:`lxc.present <salt.states.lxc.present>`
'''
salt.utils.warn_until(
@ -627,7 +627,7 @@ def cloned(name,
def set_pass(name, **kwargs): # pylint: disable=W0613
'''
.. deprecated:: 2015.2.0
.. deprecated:: 2015.5.0
This state function has been disabled, as it did not conform to design
guidelines. Specifically, due to the fact that :mod:`lxc.set_password
@ -659,7 +659,7 @@ def edited_conf(name, lxc_conf=None, lxc_conf_unset=None):
This state is unsuitable for setting parameters that appear more than
once in an LXC config file, or parameters which must appear in a
certain order (such as when configuring more than one network
interface). It is slated to be replaced, and as of version 2015.2.0 it
interface). It is slated to be replaced, and as of version 2015.5.0 it
is deprecated.
Edit LXC configuration options
@ -679,7 +679,7 @@ def edited_conf(name, lxc_conf=None, lxc_conf_unset=None):
'This state is unsuitable for setting parameters that appear more '
'than once in an LXC config file, or parameters which must appear in '
'a certain order (such as when configuring more than one network '
'interface). It is slated to be replaced, and as of version 2015.2.0 '
'interface). It is slated to be replaced, and as of version 2015.5.0 '
'it is deprecated.'
)
if __opts__['test']:

View file

@ -522,7 +522,7 @@ def unmounted(name,
name
The path to the location where the device is to be unmounted from
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
device
The device to be unmounted.

View file

@ -208,7 +208,7 @@ all interfaces are ignored unless specified.
.. note::
Apply changes to hostname immediately.
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
.. note::

View file

@ -820,7 +820,7 @@ def uptodate(name,
cwd=None,
use_vt=False):
'''
.. versionadded:: 2015.2.0
.. versionadded:: 2015.5.0
Verify that the system is completely up to date.

Some files were not shown because too many files have changed in this diff Show more