---
# This role is to  fix a misconfiguration of some OpenStack Base images at Monash University. 
# the misconfiguration is dev/vdb mounted in fstab of the Image and the Openstack Flavour not providing a second disk.
- name: unmount vdb if absent
  mount:
    path: "/mnt"
    src: "/dev/vdb"
    state: absent
  become: true
  when: 'hostvars[inventory_hostname]["ansible_devices"]["vdb"] is not defined'

- name: keep mnt present
  file:
    path: "/mnt"
    owner: root
    group: root
    mode: "u=rwx,g=rx,o=rx"
    state: directory
  become: true
  when: 'hostvars[inventory_hostname]["ansible_devices"]["vdb"] is not defined'
