aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/digitalocean_volume/tasks/main.yml
blob: c23da76c4af8f7220e20c2224ba625a70f1c512c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                               


                                                                      
                                         






                                                            
- name: Set default mount point
  ansible.builtin.set_fact:
    volume_dir: "{{ volume_dir | default('/mnt/{{ volume_name }}') }}"

- name: 'Mount volume: {{ volume_name }}'
  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