This commit is contained in:
parent
8898573dd1
commit
530f1f4009
@ -10,3 +10,6 @@ systemd:
|
||||
networkd:
|
||||
Network:
|
||||
SpeedMeter: "yes"
|
||||
presets:
|
||||
ssh:
|
||||
- enable ssh
|
||||
|
@ -22,3 +22,22 @@ systemd-service-{{ module }}:
|
||||
- watch:
|
||||
- file: systemd-configfile-{{ module }}
|
||||
{% endfor %}
|
||||
|
||||
system-preset-main-dir:
|
||||
file.directory:
|
||||
- name: {{ systemd.confdir }}/system-preset
|
||||
|
||||
{% for name, preset in systemd.presets.items() %}
|
||||
systemd-preset-{{ name }}:
|
||||
file.managed:
|
||||
- name: {{ systemd.confdir }}/system-preset/00-{{ name }}.preset
|
||||
- source: salt://systemd/templates/preset.j2
|
||||
- template: jinja
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 0644
|
||||
- context:
|
||||
preset: {{ preset }}
|
||||
- require:
|
||||
- file: {{ systemd.confdir }}/system-preset
|
||||
{% endfor %}
|
||||
|
4
states/systemd/templates/system-preset.j2
Normal file
4
states/systemd/templates/system-preset.j2
Normal file
@ -0,0 +1,4 @@
|
||||
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||
{% for rule in preset -%}
|
||||
{{ rule }}
|
||||
{%- endfor %}
|
@ -1,3 +1,4 @@
|
||||
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||
{% for module, setting in settings.items() -%}
|
||||
[{{ module }}]
|
||||
{%- for key, value in setting.items() %}
|
||||
|
Loading…
Reference in New Issue
Block a user