This repository has been archived on 2020-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-mounts/tasks/main.yml

11 lines
366 B
YAML

- name: Mount items
loop: "{{ mounts }}"
mount:
path: "{{ item.dest }}"
src: "{% if item.uuid|default() %}/dev/disk/by-uuid/{{ item.uuid }}{% else %}{{ item.path }}{% endif %}"
state: "{{ item.state|default('mounted') }}"
fstype: "{{ item.fstype|default('ext4') }}"
tags:
- mounts
when: (mounts| default([])) | length