From 503053dc9fdab7563314bb41f9a7b41f6a91073f Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 11 Oct 2017 05:23:42 +0000 Subject: [PATCH] treat fat32 in seperate task because it is not supported by filesystems module yet --- tasks/main.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index de8bad6..5cfb8ae 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,10 +1,13 @@ --- -- name: install btrfs-tools +- name: install debian packages apt: - pkg: btrfs-tools + pkg: "{{item}}" state: installed when: ansible_os_family=="Debian" + with_items: + - btrfs-tools + - dosfstools - name: unmount filesystems mount: @@ -25,7 +28,16 @@ when: item.device is defined and ( 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 mount: