mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #34300 from vutny/fix-apache-vhost-options
Make apache.configfile state handle the Options list correctly
This commit is contained in:
commit
affc65dc79
2 changed files with 5 additions and 6 deletions
|
@ -404,14 +404,13 @@ def _parse_config(conf, slot=None):
|
|||
else:
|
||||
print('{0}'.format(conf), file=ret, end='')
|
||||
elif isinstance(conf, list):
|
||||
for value in conf:
|
||||
print(_parse_config(value, str(slot)), file=ret)
|
||||
print('{0} {1}'.format(slot, ' '.join(conf)), file=ret, end='')
|
||||
elif isinstance(conf, dict):
|
||||
print('<{0} {1}>'.format(
|
||||
slot,
|
||||
_parse_config(conf['this'])),
|
||||
file=ret
|
||||
)
|
||||
file=ret
|
||||
)
|
||||
del conf['this']
|
||||
for key, value in six.iteritems(conf):
|
||||
if isinstance(value, str):
|
||||
|
@ -452,6 +451,6 @@ def config(name, config, edit=True):
|
|||
configs = _parse_config(entry[key], key)
|
||||
if edit:
|
||||
with salt.utils.fopen(name, 'w') as configfile:
|
||||
configfile.write('# This file is managed by saltstack.\n')
|
||||
configfile.write('# This file is managed by Salt.\n')
|
||||
configfile.write(configs)
|
||||
return configs
|
||||
|
|
|
@ -33,7 +33,7 @@ the above word between angle brackets (<>).
|
|||
- 127.0.0.1
|
||||
- 192.168.100.0/24
|
||||
Options:
|
||||
- +Indexes
|
||||
- Indexes
|
||||
- FollowSymlinks
|
||||
AllowOverride: All
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue