aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/digitalocean_volume/tasks
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-08-29 17:12:31 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-08-29 17:12:31 +0200
commit11abd588a614a574ebdb5e7fe099b920164b09f1 (patch)
tree8ffd89535ccae777eaa8f3862438a8f03a150677 /roles/digitalocean_volume/tasks
parentv0.0.21 (diff)
downloadinfra-ansible-11abd588a614a574ebdb5e7fe099b920164b09f1.tar.gz
infra-ansible-11abd588a614a574ebdb5e7fe099b920164b09f1.zip
add dependent services to mount/network interface roles
Diffstat (limited to '')
-rw-r--r--roles/digitalocean_volume/tasks/main.yml9
1 files changed, 8 insertions, 1 deletions
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 }}'