|
@@ -1,10 +1,13 @@ |
|
|
--- |
|
|
--- |
|
|
|
|
|
|
|
|
- name: install btrfs-tools |
|
|
|
|
|
|
|
|
- name: install debian packages |
|
|
apt: |
|
|
apt: |
|
|
pkg: btrfs-tools |
|
|
|
|
|
|
|
|
pkg: "{{item}}" |
|
|
state: installed |
|
|
state: installed |
|
|
when: ansible_os_family=="Debian" |
|
|
when: ansible_os_family=="Debian" |
|
|
|
|
|
with_items: |
|
|
|
|
|
- btrfs-tools |
|
|
|
|
|
- dosfstools |
|
|
|
|
|
|
|
|
- name: unmount filesystems |
|
|
- name: unmount filesystems |
|
|
mount: |
|
|
mount: |
|
@@ -25,7 +28,16 @@ |
|
|
when: |
|
|
when: |
|
|
item.device is defined and ( |
|
|
item.device is defined and ( |
|
|
filesystems_state == "mounted" or |
|
|
filesystems_state == "mounted" or |
|
|
filesystems_state == "formated" ) |
|
|
|
|
|
|
|
|
filesystems_state == "formated" ) and |
|
|
|
|
|
not item.fstype == "fat32" |
|
|
|
|
|
|
|
|
|
|
|
- name: format fat32 |
|
|
|
|
|
command: mkfs.fat -F32 {{ item.device }} |
|
|
|
|
|
with_items: "{{ filesystems }}" |
|
|
|
|
|
when: |
|
|
|
|
|
item.device is defined and |
|
|
|
|
|
filesystems_state == "formated" and |
|
|
|
|
|
item.fstype == "fat32" |
|
|
|
|
|
|
|
|
- name: mount filesystems |
|
|
- name: mount filesystems |
|
|
mount: |
|
|
mount: |
|
|