diff --git a/tasks/main.yml b/tasks/main.yml index 124cdc9..378a1b8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -47,18 +47,17 @@ become: true - setup: - register: dfacts -- debug: var=dfacts -- ansible.builtin.meta: end_host - name: mount /mnt/volumes/{{ volume.name }} ansible.posix.mount: path: "/mnt/volumes/{{ volume.name }}" - src: "{{ volume_output.attachments[0].device }}" + src: "{{ ansible_facts['ansible_device_links']['uuids'][volume_output.attachments[0].device.split('/')[-1]][0] }}" fstype: ext4 state: mounted become: true +- ansible.builtin.meta: end_host + - name: Create /mnt/volumes/{{ volume.name }}/data directory ansible.builtin.file: path: "/mnt/volumes/{{ volume.name }}/data"