Browse Source

add option `systemd_unit_dropin_config_name`

Fabian Peter Hammerle 1 year ago
parent
commit
45be1616ab
3 changed files with 3 additions and 1 deletions
  1. 1 0
      README.md
  2. 1 0
      defaults/main.yml
  3. 1 1
      tasks/main.yml

+ 1 - 0
README.md

@@ -14,6 +14,7 @@ systemd_unit_config: |
   [Unit]
   Description=…
   # …
+systemd_unit_dropin_config_name: custom # default: "override"
 systemd_unit_dropin_config: |
   [Service]
   LogLevelMax=notice

+ 1 - 0
defaults/main.yml

@@ -1,2 +1,3 @@
 systemd_unit_scope: system # alternative: 'global' (all users)
+systemd_unit_dropin_config_name: override
 systemd_unit_restart_if_active: no

+ 1 - 1
tasks/main.yml

@@ -22,7 +22,7 @@
     # > Along with a unit file foo.service, a "drop-in" directory foo.service.d/ may
     # > exist. All files with the suffix ".conf" from this directory will be parsed
     # > after the unit file itself is parsed.
-    dest: '{{ _dropin_config_dir.path }}/override.conf'
+    dest: '{{ _dropin_config_dir.path }}/{{ systemd_unit_dropin_config_name }}.conf'
     content: |
       # ansible managed
       {{ systemd_unit_dropin_config }}