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
|
- name: remount /tmp
|
||||||
command: mount -u -o noexec /tmp
|
command: mount -u -o noexec /tmp
|
||||||
args:
|
args:
|
||||||
warn: no
|
warn: false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Fetch fstab content
|
- name: Fetch fstab content
|
||||||
command: "grep -v '^#' /etc/fstab"
|
command: "grep -v '^#' /etc/fstab"
|
||||||
check_mode: no
|
check_mode: false
|
||||||
register: fstab_content
|
register: fstab_content
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -48,7 +48,8 @@
|
||||||
replace: '\1,noexec\3'
|
replace: '\1,noexec\3'
|
||||||
when:
|
when:
|
||||||
- fstab_content.stdout | regex_search('\s/tmp\s')
|
- 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:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
@ -60,7 +61,8 @@
|
||||||
notify: remount /tmp
|
notify: remount /tmp
|
||||||
when:
|
when:
|
||||||
- fstab_content.stdout | regex_search('\s/tmp\s')
|
- 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:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue