Fstab role : do not change lines beggining with "#"
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jérémy Dubois 2020-10-14 12:14:58 +02:00
parent 37ec518850
commit 68586d6450

View file

@ -11,7 +11,7 @@
- name: / partition is customized - softdep
replace:
dest: /etc/fstab
regexp: '(\s+/\s+\S+\s+rw)(.*)'
regexp: '([^#]\s+/\s+\S+\s+rw)(.*)'
replace: '\1,softdep\2'
when:
- fstab_content.stdout | regex_search('\s/\s')
@ -22,7 +22,7 @@
- name: /var partition is customized - softdep
replace:
dest: /etc/fstab
regexp: '(\s+/var\s+\S+\s+rw)(.*)'
regexp: '([^#]\s+/var\s+\S+\s+rw)(.*)'
replace: '\1,softdep\2'
when:
- fstab_content.stdout | regex_search('\s/var\s')
@ -33,7 +33,7 @@
- name: /usr partition is customized - softdep
replace:
dest: /etc/fstab
regexp: '(\s+/usr\s+\S+\s+rw)(.*)'
regexp: '([^#]\s+/usr\s+\S+\s+rw)(.*)'
replace: '\1,softdep\2'
when:
- fstab_content.stdout | regex_search('\s/usr\s')
@ -44,7 +44,7 @@
- name: /tmp partition is customized - noexec
replace:
dest: /etc/fstab
regexp: '(\s+/tmp\s+\S+\s+rw(,softdep)*)(.*)'
regexp: '([^#]\s+/tmp\s+\S+\s+rw(,softdep)*)(.*)'
replace: '\1,noexec\3'
when:
- fstab_content.stdout | regex_search('\s/tmp\s')
@ -56,7 +56,7 @@
- name: /tmp partition is customized - softdep
replace:
dest: /etc/fstab
regexp: '(\s+/tmp\s+\S+\s+rw)(.*)'
regexp: '([^#]\s+/tmp\s+\S+\s+rw)(.*)'
replace: '\1,softdep\2'
notify: remount /tmp
when:
@ -69,7 +69,7 @@
- name: /home partition is customized - softdep
replace:
dest: /etc/fstab
regexp: '(\s+/home\s+\S+\s+rw)(.*)'
regexp: '([^#]\s+/home\s+\S+\s+rw)(.*)'
replace: '\1,softdep\2'
when:
- fstab_content.stdout | regex_search('\s/home\s')