# yamllint disable rule:line-length --- - name: "{{ fstab_path }} partition is customized - softdep" replace: dest: /etc/fstab regexp: '([^#]\s+{{ fstab_path }}\s+ffs\s+rw)(.*)' replace: '\1,softdep\2' when: - evobsd_fstab_softdep | bool - 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: - evobsd_fstab_noatime | bool - 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: - evobsd_fstab_noexec | bool - 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