diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-29 17:12:31 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-29 17:12:31 +0200 |
commit | 11abd588a614a574ebdb5e7fe099b920164b09f1 (patch) | |
tree | 8ffd89535ccae777eaa8f3862438a8f03a150677 /roles/digitalocean_volume/tasks | |
parent | v0.0.21 (diff) | |
download | infra-ansible-11abd588a614a574ebdb5e7fe099b920164b09f1.tar.gz infra-ansible-11abd588a614a574ebdb5e7fe099b920164b09f1.zip |
add dependent services to mount/network interface roles
Diffstat (limited to 'roles/digitalocean_volume/tasks')
-rw-r--r-- | roles/digitalocean_volume/tasks/main.yml | 9 |
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 }}' |