From 11abd588a614a574ebdb5e7fe099b920164b09f1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 29 Aug 2023 17:12:31 +0200 Subject: add dependent services to mount/network interface roles --- roles/digitalocean_volume/tasks/main.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'roles/digitalocean_volume/tasks/main.yml') diff --git a/roles/digitalocean_volume/tasks/main.yml b/roles/digitalocean_volume/tasks/main.yml index f881e11..c3ef5b6 100644 --- a/roles/digitalocean_volume/tasks/main.yml +++ b/roles/digitalocean_volume/tasks/main.yml @@ -1,8 +1,15 @@ - name: 'Mount volume: {{ digitalocean_volume_name }}' become: true ansible.posix.mount: - path: "{{ digitalocean_volume_dir | default('/mnt/{{ digitalocean_volume_name }}') }}" + path: "{{ digitalocean_volume_dir }}" src: '/dev/disk/by-id/scsi-0DO_Volume_{{ digitalocean_volume_name }}' state: mounted fstype: '{{ digitalocean_volume_fs }}' opts: defaults,nofail,discard + +- name: Set up service dependencies + ansible.builtin.include_role: + name: systemd_depend_mount + vars: + systemd_depend_mount_dir: '{{ digitalocean_volume_dir }}' + systemd_depend_mount_services: '{{ digitalocean_volume_dependent_services }}' -- cgit v1.2.3