Merge branch '2016.11' into '2017.7'

Conflicts:
  - salt/modules/win_pkg.py
This commit is contained in:
rallytime 2017-08-30 12:18:19 -04:00
commit f8b025f6dc

View File

@ -446,11 +446,15 @@ def config(name, config, edit=True):
salt '*' apache.config /etc/httpd/conf.d/ports.conf config="[{'Listen': '22'}]"
'''
configs = []
for entry in config:
key = next(six.iterkeys(entry))
configs = _parse_config(entry[key], key)
configs.append(_parse_config(entry[key], key))
# Python auto-correct line endings
configstext = "\n".join(configs)
if edit:
with salt.utils.fopen(name, 'w') as configfile:
configfile.write('# This file is managed by Salt.\n')
configfile.write(configs)
return configs
configfile.write(configstext)
return configstext