37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
|
---
|
||
|
- name: "{{ fstab_path }} partition is customized - softdep"
|
||
|
replace:
|
||
|
dest: /etc/fstab
|
||
|
regexp: '([^#]\s+{{ fstab_path }}\s+ffs\s+rw)(.*)'
|
||
|
replace: '\1,softdep\2'
|
||
|
when:
|
||
|
- fstab_content.stdout | regex_search('\s' + fstab_path + '\s')
|
||
|
- not (fstab_content.stdout | regex_search('\s+' + fstab_path + '\s+ffs\s+rw,softdep'))
|
||
|
tags:
|
||
|
- fstab
|
||
|
|
||
|
- name: "{{ fstab_path }} partition is customized - noatime"
|
||
|
replace:
|
||
|
dest: /etc/fstab
|
||
|
regexp: '([^#]\s+{{ fstab_path }}\s+ffs\s+rw)(\S*)(\s+.*)'
|
||
|
replace: '\1\2,noatime\3'
|
||
|
notify: remount {{ fstab_path }} noatime
|
||
|
when:
|
||
|
- fstab_content.stdout | regex_search('\s' + fstab_path + '\s')
|
||
|
- not (fstab_content.stdout | regex_search('\s+' + fstab_path + '\s+ffs\s+rw\S*noatime'))
|
||
|
tags:
|
||
|
- fstab
|
||
|
|
||
|
- name: "{{ fstab_path }} partition is customized - noexec"
|
||
|
replace:
|
||
|
dest: /etc/fstab
|
||
|
regexp: '([^#]\s+{{ fstab_path }}\s+ffs\s+rw(,softdep)*)(.*)'
|
||
|
replace: '\1,noexec\3'
|
||
|
notify: remount {{ fstab_path }} noexec
|
||
|
when:
|
||
|
- fstab_path == "/tmp"
|
||
|
- fstab_content.stdout | regex_search('\s' + fstab_path + '\s')
|
||
|
- not (fstab_content.stdout | regex_search('\s+' + fstab_path + '\s+ffs\s+rw,(softdep,)*noexec'))
|
||
|
tags:
|
||
|
- fstab
|