move grub tag check to playbook roles

This commit is contained in:
Pig Monkey 2023-10-15 18:59:49 -07:00
parent 64ecdbcabd
commit 8fabb426d5
2 changed files with 2 additions and 3 deletions

View file

@ -3,7 +3,7 @@
become: yes
roles:
- { role: base, tags: ['base'] }
- { role: grub, tags: ['grub'] }
- { role: grub, tags: ['grub'], when: "bootloader == 'grub'"}
- { role: sudo, tags: ['sudo'] }
- { role: gnupg, tags: ['gnupg'] }
- { role: sysmon, tags: ['sysmon'] }

View file

@ -5,7 +5,7 @@
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT'
state: present
line: 'GRUB_CMDLINE_LINUX_DEFAULT="{{ kernel_parameters }}"'
when: kernel_parameters is defined and bootloader == 'grub'
when: kernel_parameters is defined
notify:
- rebuild grub
@ -15,6 +15,5 @@
regexp: '^GRUB_DISABLE_SUBMENU'
state: present
line: 'GRUB_DISABLE_SUBMENU=y'
when: bootloader == 'grub'
notify:
- rebuild grub