aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/systemd_requires_mount/tasks/main.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-07 11:06:33 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-07 19:38:45 +0200
commit7ccc51aad5ea52b26b27faf6d00413c94bf02f46 (patch)
tree4dd0bb7670b4c90e5c97350312dede37357a19cd /roles/systemd_requires_mount/tasks/main.yml
parentlinux_status: factor out PPA set up to a separate role (diff)
downloadinfra-ansible-7ccc51aad5ea52b26b27faf6d00413c94bf02f46.tar.gz
infra-ansible-7ccc51aad5ea52b26b27faf6d00413c94bf02f46.zip
factor out systemd service editing
Diffstat (limited to '')
-rw-r--r--roles/systemd_edit/tasks/main.yml (renamed from roles/systemd_requires_mount/tasks/main.yml)9
1 files changed, 5 insertions, 4 deletions
diff --git a/roles/systemd_requires_mount/tasks/main.yml b/roles/systemd_edit/tasks/main.yml
index cd4beb3..06a0a8a 100644
--- a/roles/systemd_requires_mount/tasks/main.yml
+++ b/roles/systemd_edit/tasks/main.yml
@@ -1,4 +1,4 @@
-- name: Set up systemd service dependency
+- name: Edit systemd service definition
become: true
block:
- name: 'Create override directory: {{ service_name }}'
@@ -9,9 +9,10 @@
- name: 'Set up override: {{ service_name }}'
community.general.ini_file:
dest: '/etc/systemd/system/{{ service_name }}.service.d/override.conf'
- section: Unit
- option: RequiresMountsFor
- value: '{{ mount_dir }}'
+ section: '{{ service_section }}'
+ option: '{{ service_option }}'
+ values: '{{ service_values }}'
+ no_extra_spaces: true
register: overridden
- name: 'Restart service: {{ service_name }}'