# Set up and mount performance clustered storage

- block:
    - name: Make sure nfs-common is installed
      apt:
        pkg: nfs-common
        state: present

    - name: create mount point for sun-pcs01
      file:
        path: "{{SUN_PCS01_LOGS_MOUNT_POINT}}"
        mode: 0777
        state: directory

    - name: Create mount for sun-pcs01
      mount:
        state: mounted
        fstype: ceph
        src: "{{SUN_PCS01_LOGS_HOST}}:{{SUN_PCS01_LOGS_EXPORT}}"
        name: "{{SUN_PCS01_LOGS_MOUNT_POINT}}"
        opts: "name=sun_pcs01_fs_rw,secret={{ lookup('hashi_vault', 'secret=secret/pcs/sun-pcs01').password }},rbytes,_netdev"
        passno: 0

  become: yes
