Remove dashes from variables.
Dashes causes some weird issues while rendering jinja templates.
This commit is contained in:
parent
93883cdcb6
commit
24e66ca8bf
|
@ -18,5 +18,5 @@ include:
|
||||||
included: True
|
included: True
|
||||||
sudoers: {{ spec|json }}
|
sudoers: {{ spec|json }}
|
||||||
- require:
|
- require:
|
||||||
- file: {{ sudoers.get('config-path', '/etc') }}/sudoers
|
- file: {{ sudoers.get('configpath', '/etc') }}/sudoers
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -4,14 +4,14 @@ sudo:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ sudoers.pkg }}
|
- name: {{ sudoers.pkg }}
|
||||||
|
|
||||||
{{ sudoers.get('config-path', '/etc') }}/sudoers:
|
{{ sudoers.get('configpath', '/etc') }}/sudoers:
|
||||||
file.managed:
|
file.managed:
|
||||||
- user: root
|
- user: root
|
||||||
- group: {{ sudoers.get('group', 'root') }}
|
- group: {{ sudoers.get('group', 'root') }}
|
||||||
- mode: 440
|
- mode: 440
|
||||||
- template: jinja
|
- template: jinja
|
||||||
- source: salt://sudoers/files/sudoers
|
- source: salt://sudoers/files/sudoers
|
||||||
- check_cmd: {{ sudoers.get('exec-prefix', '/usr/sbin') }}/visudo -c -f
|
- check_cmd: {{ sudoers.get('execprefix', '/usr/sbin') }}/visudo -c -f
|
||||||
- context:
|
- context:
|
||||||
included: False
|
included: False
|
||||||
- require:
|
- require:
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
'Arch': {'pkg': 'sudo'},
|
'Arch': {'pkg': 'sudo'},
|
||||||
'Suse': {'pkg': 'sudo'},
|
'Suse': {'pkg': 'sudo'},
|
||||||
'FreeBSD': {'pkg': 'sudo',
|
'FreeBSD': {'pkg': 'sudo',
|
||||||
'config-path': '/usr/local/etc',
|
'configpath': '/usr/local/etc',
|
||||||
'exec-prefix': '/usr/local/sbin',
|
'execprefix': '/usr/local/sbin',
|
||||||
'group': 'wheel'},
|
'group': 'wheel'},
|
||||||
}, merge=salt['pillar.get']('sudoers:lookup')) %}
|
}, merge=salt['pillar.get']('sudoers:lookup')) %}
|
||||||
|
|
Loading…
Reference in New Issue