From ba72e84010822fd3cc2774db9d77ed2f917a1929 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 4 Aug 2023 12:39:53 +0200 Subject: import a couple more roles --- roles/digitalocean_volume/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/digitalocean_volume/tasks/main.yml (limited to 'roles/digitalocean_volume/tasks') diff --git a/roles/digitalocean_volume/tasks/main.yml b/roles/digitalocean_volume/tasks/main.yml new file mode 100644 index 0000000..57ca0e2 --- /dev/null +++ b/roles/digitalocean_volume/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Default mount path + ansible.builtin.set_fact: + volume_dir: "{{ volume_dir | default('/mnt/{{ volume_name }}') }}" + +- name: Mount volume + become: true + ansible.posix.mount: + path: '{{ volume_dir }}' + src: '/dev/disk/by-id/scsi-0DO_Volume_{{ volume_name }}' + state: mounted + fstype: '{{ volume_fs }}' + opts: defaults,nofail,discard -- cgit v1.2.3