initial project commit

This commit is contained in:
2024-07-01 12:28:55 -04:00
commit 5aea370828
4 changed files with 75 additions and 0 deletions

7
tasks/cleanup.yml Normal file
View File

@ -0,0 +1,7 @@
---
- name: Cleanup /etc/default/grub to remove fsck
ansible.builtin.replace:
path: /etc/default/grub
regexp: '(GRUB_CMDLINE_LINUX=".*)\s+(fsck\.mode=force)\s+(fsck.repair=yes)(.*")'
replace: '\1\4'
notify: Update_Grub

10
tasks/main.yml Normal file
View File

@ -0,0 +1,10 @@
---
- name: Configure /etc/default/grub for fsck
ansible.builtin.lineinfile:
state: present
dest: /etc/default/grub
backrefs: true
regexp: '^(GRUB_CMDLINE_LINUX=(?!.* fsck)\"[^\"]+)(\".*)'
line: '\1 fsck.mode=force fsck.repair=yes\2'
backup: true
notify: Update_Grub