yamllint + correction /tmp softdep
softdep is not added anymore if noexec is already defined after rw
This commit is contained in:
parent
88df904282
commit
e019b79723
|
@ -5,4 +5,4 @@
|
|||
- name: remount /tmp
|
||||
command: mount -u -o noexec /tmp
|
||||
args:
|
||||
warn: no
|
||||
warn: false
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: Fetch fstab content
|
||||
command: "grep -v '^#' /etc/fstab"
|
||||
check_mode: no
|
||||
check_mode: false
|
||||
register: fstab_content
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
|
@ -48,7 +48,8 @@
|
|||
replace: '\1,noexec\3'
|
||||
when:
|
||||
- fstab_content.stdout | regex_search('\s/tmp\s')
|
||||
- not (fstab_content.stdout | regex_search('\s+/tmp\s+\S+\s+rw,(softdep,)*noexec'))
|
||||
- not (fstab_content.stdout
|
||||
| regex_search('\s+/tmp\s+\S+\s+rw,(softdep,)*noexec'))
|
||||
tags:
|
||||
- fstab
|
||||
|
||||
|
@ -60,7 +61,8 @@
|
|||
notify: remount /tmp
|
||||
when:
|
||||
- fstab_content.stdout | regex_search('\s/tmp\s')
|
||||
- not (fstab_content.stdout | regex_search('\s+/tmp\s+\S+\s+rw,softdep'))
|
||||
- not (fstab_content.stdout
|
||||
| regex_search('\s+/tmp\s+\S+\s+rw,(noexec,)*softdep'))
|
||||
tags:
|
||||
- fstab
|
||||
|
||||
|
|
Loading…
Reference in a new issue