mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge branch 'develop' of github.com:saltstack/salt into develop
This commit is contained in:
commit
8ff814ce7f
@ -15,7 +15,7 @@ Full list of builtin modules
|
||||
archive
|
||||
butterkvm
|
||||
cluster
|
||||
cmd
|
||||
cmdmod
|
||||
cp
|
||||
cron
|
||||
data
|
||||
@ -24,6 +24,7 @@ Full list of builtin modules
|
||||
file
|
||||
freebsdkmod
|
||||
freebsdpkg
|
||||
gem
|
||||
gentoo_service
|
||||
grains
|
||||
groupadd
|
||||
@ -44,6 +45,7 @@ Full list of builtin modules
|
||||
pw_group
|
||||
pw_user
|
||||
rh_service
|
||||
rvm
|
||||
saltutil
|
||||
selinux
|
||||
service
|
||||
@ -56,6 +58,7 @@ Full list of builtin modules
|
||||
systemd
|
||||
test
|
||||
tomcat
|
||||
upstart
|
||||
useradd
|
||||
virt
|
||||
virtualenv
|
||||
|
@ -13,6 +13,7 @@ Full list of builtin states
|
||||
cmd
|
||||
cron
|
||||
file
|
||||
gem
|
||||
group
|
||||
host
|
||||
kmod
|
||||
@ -20,6 +21,7 @@ Full list of builtin states
|
||||
mysql_database
|
||||
mysql_user
|
||||
pkg
|
||||
rvm
|
||||
service
|
||||
ssh_auth
|
||||
sysctl
|
||||
|
@ -95,6 +95,29 @@ passed in the form of ``kwarg=argument``.
|
||||
Matcher Refinements and Changes
|
||||
-------------------------------
|
||||
|
||||
Support has been added for matching minions with Yahoo's range library. This
|
||||
is handled by passing range syntax with *-R* or *--range* arguments to salt.
|
||||
|
||||
More information at:
|
||||
https://github.com/grierj/range/wiki/Introduction-to-Range-with-YAML-files
|
||||
|
||||
Much like the rest of salt, grains are now matched by default using globs
|
||||
instead of regular expressions. A new *--grain-pcre* was added to the salt
|
||||
command line for doing just this:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# salt --grain-pcre 'os:(Arch:Fed).*' test.ping
|
||||
|
||||
The associated compound matcher for use in states or the ``top.sls`` is *P*:
|
||||
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
P@os:(Arch|Fed).*
|
||||
|
||||
**NOTE**: The default grains matcher has changed from pcre to glob for consistency
|
||||
=======
|
||||
A number of fixes and changes have been applied to the Matcher system. The
|
||||
most noteworthy is the change in the grain matcher. The grain matcher used
|
||||
a regular expression to match the passed data to a grain, but now defaults
|
||||
@ -162,21 +185,24 @@ Module Updates
|
||||
This is a list of notable, but not complete updates with new and existing
|
||||
modules.
|
||||
|
||||
For our ruby users, new 'rvm' and 'gem' modules have been added along with
|
||||
the associated states.
|
||||
For our ruby users, new :doc:`rvm </ref/modules/all/salt.modules.rvm>` and
|
||||
:doc:`gem </ref/modules/all/salt.modules.gem>` modules have been added along
|
||||
with the :doc:`associated </ref/states/all/salt.states.rvm>`
|
||||
:doc:`states </ref/states/all/salt.states.gem>`
|
||||
|
||||
The 'virt' module gained basic Xen support.
|
||||
|
||||
The 'pkg' module supports Scientific Linux.
|
||||
The :doc:`virt </ref/modules/all/salt.modules.virt>` module gained basic Xen support.
|
||||
|
||||
The 'pkg' module on Debian, Ubuntu, and derivatives forces apt to run in a
|
||||
non-interactive mode preventing previous issues with installation. Also,
|
||||
Ubuntu users gained a new upstart 'service' module.
|
||||
The :doc:`pkg </ref/modules/all/salt.modules.yumpkg>` module gained Scientific Linux support.
|
||||
|
||||
The 'mysql.user' state and 'mysql' module gained a *password_hash* argument.
|
||||
The :doc:`pkg </ref/modules/all/salt.modules.apt>` module on Debian, Ubuntu, and derivatives
|
||||
forces apt to run in a non-interactive mode preventing previous issues with installation. Also,
|
||||
Ubuntu users gained a new upstart :doc:`service </ref/modules/all/salt.modules.upstart>` module.
|
||||
|
||||
The 'cmd' module and state gained a *shell* keyword argument for specifying
|
||||
a shell other than /bin/sh on Linux / Unix systems.
|
||||
The :doc:`mysql.user </ref/states/all/salt.states.mysql_user>` state and :doc:`mysql </ref/modules/all/salt.modules.mysql>` module gained a *password_hash* argument.
|
||||
|
||||
The :doc:`cmd </ref/modules/all/salt.modules.cmdmod>` module and state gained a *shell* keyword argument for specifying
|
||||
a shell other than ``/bin/sh`` on Linux / Unix systems.
|
||||
|
||||
|
||||
In Progress Development
|
||||
|
@ -373,9 +373,11 @@ def user_create(user,
|
||||
'''
|
||||
Creates a MySQL user.
|
||||
|
||||
CLI Example::
|
||||
CLI Examples::
|
||||
|
||||
salt '*' mysql.user_create 'username' 'hostname' 'password'
|
||||
salt '*' mysql.user_create 'username' 'hostname' 'password
|
||||
|
||||
salt '*' mysql.user_create 'username' 'hostname' password_hash='hash'
|
||||
'''
|
||||
if user_exists(user,host):
|
||||
log.info("User '{0}'@'{1}' already exists".format(user,host,))
|
||||
@ -406,9 +408,11 @@ def user_chpass(user,
|
||||
'''
|
||||
Change password for MySQL user
|
||||
|
||||
CLI Example::
|
||||
CLI Examples::
|
||||
|
||||
salt '*' mysql.user_chpass frank localhost newpassword
|
||||
|
||||
salt '*' mysql.user_chpass frank localhost password_hash='hash'
|
||||
'''
|
||||
if password is None or password_hash is None:
|
||||
log.error('No password provided')
|
||||
|
@ -22,6 +22,12 @@ def present(name,
|
||||
|
||||
name
|
||||
The name of the user to manage
|
||||
|
||||
password
|
||||
The password
|
||||
|
||||
password_hash
|
||||
The password in hashed form
|
||||
'''
|
||||
ret = {'name': name,
|
||||
'changes': {},
|
||||
|
Loading…
Reference in New Issue
Block a user