# we have to make sure that the disk is NOT mounted by cloud-init beforehand
- name: mount ephemeral disk
  mount:
    path: /vol/scratch
    src: "{{ ephemerals[0] }}"
    fstype: ext4
    state: mounted
  when:
    - ephemerals

- name: Change permissions for mountpoint
  file:
    path: /vol/scratch
    mode: 0777
    state: directory
    recurse: yes
  when:
    - ephemerals

# we have to make sure that the disk is NOT mounted by cloud-init beforehand
- name: mount disk
  mount:
    path: /vol/scratch
    src: "{{ ephemerals[0] }}"
    fstype: ext4
    state: mounted
  when:
    - ephemerals
    
- name: Change permission for newly mounted /vol/scratch mount point
  file:
    path: /vol/scratch
    state: directory
    mode: 0777
  when:
    - ephemerals

Modify scratch volume mount permission and allow it for all users.
Modify scratch volume mount permission and allow it for all users.