diff --git a/tasks/modprobe.yml b/tasks/modprobe.yml index bccb54b00..eb9ec0065 100644 --- a/tasks/modprobe.yml +++ b/tasks/modprobe.yml @@ -14,6 +14,12 @@ os_unused_filesystems: "{{ os_unused_filesystems | difference('vfat') }}" when: efi_installed.stat.isdir is defined and efi_installed.stat.isdir +- name: remove used filesystems from fs-list + set_fact: + os_unused_filesystems: "{{ os_unused_filesystems | difference(ansible_mounts | map(attribute='fstype') | list) }}" + # we cannot do this on el6 and below, because these systems don't support the map function + when: not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7') + - name: disable unused filesystems | os-10 template: src: 'etc/modprobe.d/modprobe.j2'