mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge branch '2014.7' into develop
Conflicts: doc/topics/installation/windows.rst salt/states/rabbitmq_cluster.py
This commit is contained in:
commit
01b917fcf6
@ -20,6 +20,10 @@ minion exe>` should match the contents of the corresponding md5 file.
|
||||
|
||||
.. admonition:: Download here
|
||||
|
||||
* 2014.1.13
|
||||
* `Salt-Minion-2014.1.13-x86-Setup.exe <http://docs.saltstack.com/downloads/Salt-Minion-2014.1.13-x86-Setup.exe>`__ | `md5 <http://docs.saltstack.com/downloads/Salt-Minion-2014.1.13-x86-Setup.exe.md5>`__
|
||||
* `Salt-Minion-2014.1.13-AMD64-Setup.exe <http://docs.saltstack.com/downloads/Salt-Minion-2014.1.13-AMD64-Setup.exe>`__ | `md5 <http://docs.saltstack.com/downloads/Salt-Minion-2014.1.13-AMD64-Setup.exe.md5>`__
|
||||
|
||||
* 2014.1.11
|
||||
* `Salt-Minion-2014.1.11-win32-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.11-win32-Setup.exe>`__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.11-win32-Setup.exe.md5>`__
|
||||
* `Salt-Minion-2014.1.11-AMD64-Setup.exe <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.11-AMD64-Setup.exe>`__ | `md5 <https://docs.saltstack.com/downloads/Salt-Minion-2014.1.11-AMD64-Setup.exe.md5>`__
|
||||
|
@ -1162,8 +1162,13 @@ def get_repo(repo, **kwargs):
|
||||
ppa_name, dist)
|
||||
else:
|
||||
if HAS_SOFTWAREPROPERTIES:
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(
|
||||
__grains__['lsb_distrib_codename'])[0]
|
||||
if hasattr(softwareproperties.ppa, 'PPAShortcutHandler'):
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(
|
||||
__grains__['lsb_distrib_codename'])[0]
|
||||
else:
|
||||
repo = softwareproperties.ppa.expand_ppa_line(
|
||||
repo,
|
||||
__grains__['lsb_distrib_codename'])[0]
|
||||
else:
|
||||
repo = LP_SRC_FORMAT.format(owner_name, ppa_name, dist)
|
||||
|
||||
@ -1234,7 +1239,10 @@ def del_repo(repo, **kwargs):
|
||||
else:
|
||||
repo = LP_SRC_FORMAT.format(owner_name, ppa_name, dist)
|
||||
else:
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(dist)[0]
|
||||
if hasattr(softwareproperties.ppa, 'PPAShortcutHandler'):
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(dist)[0]
|
||||
else:
|
||||
repo = softwareproperties.ppa.expand_ppa_line(repo, dist)[0]
|
||||
|
||||
sources = sourceslist.SourcesList()
|
||||
repos = [s for s in sources.list if not s.invalid]
|
||||
@ -1625,7 +1633,10 @@ def expand_repo_def(repokwargs):
|
||||
dist)
|
||||
else:
|
||||
if HAS_SOFTWAREPROPERTIES:
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(dist)[0]
|
||||
if hasattr(softwareproperties.ppa, 'PPAShortcutHandler'):
|
||||
repo = softwareproperties.ppa.PPAShortcutHandler(repo).expand(dist)[0]
|
||||
else:
|
||||
repo = softwareproperties.ppa.expand_ppa_line(repo, dist)[0]
|
||||
else:
|
||||
repo = LP_SRC_FORMAT.format(owner_name, ppa_name, dist)
|
||||
|
||||
|
@ -222,8 +222,12 @@ def run(name, **kwargs):
|
||||
ret['comment'] = 'Module function {0} executed'.format(name)
|
||||
|
||||
ret['result'] = True
|
||||
if ret['changes'].get('retcode', 0) != 0:
|
||||
# if mret is a dict and there is retcode and its non-zero
|
||||
if isinstance(mret, dict) and mret.get('retcode', 0) != 0:
|
||||
ret['result'] = False
|
||||
# if its a boolean, return that as the result
|
||||
elif isinstance(mret, bool):
|
||||
ret['result'] = mret
|
||||
else:
|
||||
changes_ret = ret['changes'].get('ret', {})
|
||||
if isinstance(changes_ret, dict) and changes_ret.get('retcode', 0) != 0:
|
||||
|
@ -29,7 +29,7 @@ def __virtual__():
|
||||
return salt.utils.which('rabbitmqctl') is not None
|
||||
|
||||
|
||||
def joined(name, host, user='rabbit', ram_node=None, runas=None):
|
||||
def joined(name, host, user='rabbit', ram_node=None, runas='root'):
|
||||
'''
|
||||
Ensure the current node joined to a cluster with node user@host
|
||||
|
||||
|
@ -29,7 +29,7 @@ def __virtual__():
|
||||
return False
|
||||
|
||||
|
||||
def enabled(name, runas=None):
|
||||
def enabled(name, runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ plugin is enabled.
|
||||
|
||||
@ -62,7 +62,7 @@ def enabled(name, runas=None):
|
||||
return ret
|
||||
|
||||
|
||||
def disabled(name, runas=None):
|
||||
def disabled(name, runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ plugin is disabled.
|
||||
|
||||
|
@ -37,7 +37,7 @@ def present(name,
|
||||
definition,
|
||||
priority=0,
|
||||
vhost='/',
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ policy exists.
|
||||
|
||||
@ -107,7 +107,7 @@ def present(name,
|
||||
|
||||
def absent(name,
|
||||
vhost='/',
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the named policy is absent
|
||||
|
||||
|
@ -43,7 +43,7 @@ def present(name,
|
||||
force=False,
|
||||
tags=None,
|
||||
perms=(),
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ user exists.
|
||||
|
||||
@ -144,7 +144,7 @@ def present(name,
|
||||
|
||||
|
||||
def absent(name,
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the named user is absent
|
||||
|
||||
|
@ -33,11 +33,11 @@ def __virtual__():
|
||||
|
||||
def present(name,
|
||||
user=None,
|
||||
owner=None,
|
||||
owner='root',
|
||||
conf=None,
|
||||
write=None,
|
||||
read=None,
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ VHost exists.
|
||||
|
||||
@ -146,7 +146,7 @@ def present(name,
|
||||
|
||||
|
||||
def absent(name,
|
||||
runas=None):
|
||||
runas='root'):
|
||||
'''
|
||||
Ensure the RabbitMQ Virtual Host is absent
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user