2018-05-01 10:16:11 +08:00
|
|
|
---
|
|
|
|
- name: install modprobe to disable filesystems | os-10
|
|
|
|
package:
|
|
|
|
name: '{{modprobe_package}}'
|
|
|
|
state: 'present'
|
|
|
|
|
2018-09-17 23:23:56 +08:00
|
|
|
- name: check if efi is installed
|
|
|
|
stat:
|
|
|
|
path: "/sys/firmware/efi"
|
|
|
|
register: efi_installed
|
|
|
|
|
|
|
|
- name: remove vfat from fs-list if efi is used
|
|
|
|
set_fact:
|
|
|
|
os_unused_filesystems: "{{ os_unused_filesystems | difference('vfat') }}"
|
|
|
|
when: efi_installed.stat.isdir is defined and efi_installed.stat.isdir
|
|
|
|
|
2018-05-01 10:16:11 +08:00
|
|
|
- name: disable unused filesystems | os-10
|
|
|
|
template:
|
2018-09-17 23:23:56 +08:00
|
|
|
src: 'etc/modprobe.d/modprobe.j2'
|
2018-05-01 10:16:11 +08:00
|
|
|
dest: '/etc/modprobe.d/dev-sec.conf'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: '0640'
|
|
|
|
|