Fstab : we now also add noatime to each partitions
This commit is contained in:
parent
4c902eda5a
commit
a7b96d9f67
|
@ -2,7 +2,32 @@
|
||||||
- name: newaliases
|
- name: newaliases
|
||||||
shell: smtpctl update table aliases
|
shell: smtpctl update table aliases
|
||||||
|
|
||||||
- name: remount /tmp
|
- name: remount / noatime
|
||||||
|
command: mount -u -o noatime /
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: remount /var noatime
|
||||||
|
command: mount -u -o noatime /var
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: remount /usr noatime
|
||||||
|
command: mount -u -o noatime /usr
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: remount /tmp noexec
|
||||||
command: mount -u -o noexec /tmp
|
command: mount -u -o noexec /tmp
|
||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
|
|
||||||
|
- name: remount /tmp noatime
|
||||||
|
command: mount -u -o noatime /tmp
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: remount /home noatime
|
||||||
|
command: mount -u -o noatime /home
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
|
@ -19,6 +19,18 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
- name: / partition is customized - noatime
|
||||||
|
replace:
|
||||||
|
dest: /etc/fstab
|
||||||
|
regexp: '([^#]\s+/\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
replace: '\1\2,noatime\3'
|
||||||
|
notify: remount / noatime
|
||||||
|
when:
|
||||||
|
- fstab_content.stdout | regex_search('\s/\s')
|
||||||
|
- not (fstab_content.stdout | regex_search('\s+/\s+ffs\s+rw\S*noatime'))
|
||||||
|
tags:
|
||||||
|
- fstab
|
||||||
|
|
||||||
- name: /var partition is customized - softdep
|
- name: /var partition is customized - softdep
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
|
@ -30,6 +42,18 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
- name: /var partition is customized - noatime
|
||||||
|
replace:
|
||||||
|
dest: /etc/fstab
|
||||||
|
regexp: '([^#]\s+/var\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
replace: '\1\2,noatime\3'
|
||||||
|
notify: remount /var noatime
|
||||||
|
when:
|
||||||
|
- fstab_content.stdout | regex_search('\s/var\s')
|
||||||
|
- not (fstab_content.stdout | regex_search('\s+/var\s+ffs\s+rw\S*noatime'))
|
||||||
|
tags:
|
||||||
|
- fstab
|
||||||
|
|
||||||
- name: /usr partition is customized - softdep
|
- name: /usr partition is customized - softdep
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
|
@ -41,11 +65,24 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
- name: /usr partition is customized - noatime
|
||||||
|
replace:
|
||||||
|
dest: /etc/fstab
|
||||||
|
regexp: '([^#]\s+/usr\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
replace: '\1\2,noatime\3'
|
||||||
|
notify: remount /usr noatime
|
||||||
|
when:
|
||||||
|
- fstab_content.stdout | regex_search('\s/usr\s')
|
||||||
|
- not (fstab_content.stdout | regex_search('\s+/usr\s+ffs\s+rw\S*noatime'))
|
||||||
|
tags:
|
||||||
|
- fstab
|
||||||
|
|
||||||
- name: /tmp partition is customized - noexec
|
- name: /tmp partition is customized - noexec
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/tmp\s+ffs\s+rw(,softdep)*)(.*)'
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw(,softdep)*)(.*)'
|
||||||
replace: '\1,noexec\3'
|
replace: '\1,noexec\3'
|
||||||
|
notify: remount /tmp noexec
|
||||||
when:
|
when:
|
||||||
- fstab_content.stdout | regex_search('\s/tmp\s')
|
- fstab_content.stdout | regex_search('\s/tmp\s')
|
||||||
- not (fstab_content.stdout
|
- not (fstab_content.stdout
|
||||||
|
@ -58,7 +95,6 @@
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(.*)'
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(.*)'
|
||||||
replace: '\1,softdep\2'
|
replace: '\1,softdep\2'
|
||||||
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
|
- not (fstab_content.stdout
|
||||||
|
@ -66,6 +102,18 @@
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
- name: /tmp partition is customized - noatime
|
||||||
|
replace:
|
||||||
|
dest: /etc/fstab
|
||||||
|
regexp: '([^#]\s+/tmp\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
replace: '\1\2,noatime\3'
|
||||||
|
notify: remount /tmp noatime
|
||||||
|
when:
|
||||||
|
- fstab_content.stdout | regex_search('\s/tmp\s')
|
||||||
|
- not (fstab_content.stdout | regex_search('\s+/tmp\s+ffs\s+rw\S*noatime'))
|
||||||
|
tags:
|
||||||
|
- fstab
|
||||||
|
|
||||||
- name: /home partition is customized - softdep
|
- name: /home partition is customized - softdep
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
|
@ -76,3 +124,15 @@
|
||||||
- not (fstab_content.stdout | regex_search('\s+/home\s+ffs\s+rw,softdep'))
|
- not (fstab_content.stdout | regex_search('\s+/home\s+ffs\s+rw,softdep'))
|
||||||
tags:
|
tags:
|
||||||
- fstab
|
- fstab
|
||||||
|
|
||||||
|
- name: /home partition is customized - noatime
|
||||||
|
replace:
|
||||||
|
dest: /etc/fstab
|
||||||
|
regexp: '([^#]\s+/home\s+ffs\s+rw)(\S*)(\s+.*)'
|
||||||
|
replace: '\1\2,noatime\3'
|
||||||
|
notify: remount /home noatime
|
||||||
|
when:
|
||||||
|
- fstab_content.stdout | regex_search('\s/home\s')
|
||||||
|
- not (fstab_content.stdout | regex_search('\s+/home\s+ffs\s+rw\S*noatime'))
|
||||||
|
tags:
|
||||||
|
- fstab
|
||||||
|
|
Loading…
Reference in a new issue