From 7ccc51aad5ea52b26b27faf6d00413c94bf02f46 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 7 Aug 2023 11:06:33 +0200 Subject: factor out systemd service editing --- roles/systemd_requires_mount/tasks/main.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 roles/systemd_requires_mount/tasks/main.yml (limited to 'roles/systemd_requires_mount/tasks/main.yml') diff --git a/roles/systemd_requires_mount/tasks/main.yml b/roles/systemd_requires_mount/tasks/main.yml deleted file mode 100644 index cd4beb3..0000000 --- a/roles/systemd_requires_mount/tasks/main.yml +++ /dev/null @@ -1,22 +0,0 @@ -- name: Set up systemd service dependency - become: true - block: - - name: 'Create override directory: {{ service_name }}' - ansible.builtin.file: - path: '/etc/systemd/system/{{ service_name }}.service.d' - state: directory - - - 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 }}' - register: overridden - - - name: 'Restart service: {{ service_name }}' - ansible.builtin.systemd_service: - daemon_reload: true - name: '{{ service_name }}' - state: restarted - when: overridden.changed -- cgit v1.2.3