Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

systemd.sls 1010B

1234567891011121314151617181920212223242526272829303132333435363738
  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled and grains.get('init', None) == 'systemd' %}
  3. {%- if system.systemd.journal is defined %}
  4. include:
  5. - linux.system.journal
  6. {%- endif %}
  7. {%- if system.systemd.system is defined %}
  8. linux_systemd_system_config:
  9. file.managed:
  10. - name: /etc/systemd/system.conf.d/90-salt.conf
  11. - source: salt://linux/files/systemd.conf
  12. - template: jinja
  13. - makedirs: True
  14. - defaults:
  15. settings: {{ system.systemd.system }}
  16. - watch_in:
  17. - module: linux_systemd_reload
  18. {%- endif %}
  19. {%- if system.systemd.user is defined %}
  20. linux_systemd_user_config:
  21. file.managed:
  22. - name: /etc/systemd/user.conf.d/90-salt.conf
  23. - source: salt://linux/files/systemd.conf
  24. - template: jinja
  25. - makedirs: True
  26. - defaults:
  27. settings: {{ system.systemd.user }}
  28. - watch_in:
  29. - module: linux_systemd_reload
  30. {%- endif %}
  31. linux_systemd_reload:
  32. module.wait:
  33. - name: service.systemctl_reload
  34. {%- endif %}