mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2016.11' into '2017.7'
No conflicts.
This commit is contained in:
commit
c98470e557
5 changed files with 21 additions and 12 deletions
|
@ -72,12 +72,12 @@ MOCK_MODULES = [
|
|||
'Crypto.Signature',
|
||||
'Crypto.Signature.PKCS1_v1_5',
|
||||
'M2Crypto',
|
||||
'msgpack',
|
||||
'yaml',
|
||||
'yaml.constructor',
|
||||
'yaml.nodes',
|
||||
'yaml.parser',
|
||||
'yaml.scanner',
|
||||
'salt.utils.yamlloader',
|
||||
'zmq',
|
||||
'zmq.eventloop',
|
||||
'zmq.eventloop.ioloop',
|
||||
|
@ -126,7 +126,6 @@ MOCK_MODULES = [
|
|||
'ClusterShell',
|
||||
'ClusterShell.NodeSet',
|
||||
'django',
|
||||
'docker',
|
||||
'libvirt',
|
||||
'MySQLdb',
|
||||
'MySQLdb.cursors',
|
||||
|
@ -176,7 +175,7 @@ MOCK_MODULES = [
|
|||
|
||||
for mod_name in MOCK_MODULES:
|
||||
if mod_name == 'psutil':
|
||||
mock = Mock(mapping={'total': 0, 'version_info': (0, 6,0)}) # Otherwise it will crash Sphinx
|
||||
mock = Mock(mapping={'total': 0}) # Otherwise it will crash Sphinx
|
||||
else:
|
||||
mock = Mock()
|
||||
sys.modules[mod_name] = mock
|
||||
|
|
|
@ -840,7 +840,7 @@ def _parse_network_settings(opts, current):
|
|||
_raise_error_network('hostname', ['server1.example.com'])
|
||||
|
||||
if 'nozeroconf' in opts:
|
||||
nozeroconf = salt.utils.dequote(opts['nozerconf'])
|
||||
nozeroconf = salt.utils.dequote(opts['nozeroconf'])
|
||||
if nozeroconf in valid:
|
||||
if nozeroconf in _CONFIG_TRUE:
|
||||
result['nozeroconf'] = true_val
|
||||
|
|
|
@ -300,7 +300,7 @@ def install_semod(module_path):
|
|||
|
||||
salt '*' selinux.install_semod [salt://]path/to/module.pp
|
||||
|
||||
.. versionadded:: develop
|
||||
.. versionadded:: 2016.11.6
|
||||
'''
|
||||
if module_path.find('salt://') == 0:
|
||||
module_path = __salt__['cp.cache_file'](module_path)
|
||||
|
@ -318,7 +318,7 @@ def remove_semod(module):
|
|||
|
||||
salt '*' selinux.remove_semod module_name
|
||||
|
||||
.. versionadded:: develop
|
||||
.. versionadded:: 2016.11.6
|
||||
'''
|
||||
cmd = 'semodule -r {0}'.format(module)
|
||||
return not __salt__['cmd.retcode'](cmd)
|
||||
|
|
|
@ -258,12 +258,22 @@ def _get_opts(**kwargs):
|
|||
Return a copy of the opts for use, optionally load a local config on top
|
||||
'''
|
||||
opts = copy.deepcopy(__opts__)
|
||||
|
||||
if 'localconfig' in kwargs:
|
||||
opts = salt.config.minion_config(kwargs['localconfig'], defaults=opts)
|
||||
else:
|
||||
if 'saltenv' in kwargs:
|
||||
return salt.config.minion_config(kwargs['localconfig'], defaults=opts)
|
||||
|
||||
if 'saltenv' in kwargs:
|
||||
saltenv = kwargs['saltenv']
|
||||
if not isinstance(saltenv, six.string_types):
|
||||
opts['environment'] = str(kwargs['saltenv'])
|
||||
else:
|
||||
opts['environment'] = kwargs['saltenv']
|
||||
if 'pillarenv' in kwargs:
|
||||
|
||||
if 'pillarenv' in kwargs:
|
||||
pillarenv = kwargs['pillarenv']
|
||||
if not isinstance(pillarenv, six.string_types):
|
||||
opts['pillarenv'] = str(kwargs['pillarenv'])
|
||||
else:
|
||||
opts['pillarenv'] = kwargs['pillarenv']
|
||||
|
||||
return opts
|
||||
|
|
|
@ -262,7 +262,7 @@ def module_install(name):
|
|||
name
|
||||
Path to file with module to install
|
||||
|
||||
.. versionadded:: develop
|
||||
.. versionadded:: 2016.11.6
|
||||
'''
|
||||
ret = {'name': name,
|
||||
'result': True,
|
||||
|
@ -283,7 +283,7 @@ def module_remove(name):
|
|||
name
|
||||
The name of the module to remove
|
||||
|
||||
.. versionadded:: develop
|
||||
.. versionadded:: 2016.11.6
|
||||
'''
|
||||
ret = {'name': name,
|
||||
'result': True,
|
||||
|
|
Loading…
Add table
Reference in a new issue