Optional grub cmdline parameters.

This commit is contained in:
Andrea Dell'Amico 2024-07-12 17:19:54 +02:00
parent 5abdd7babc
commit d4ce7432b7
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
4 changed files with 23 additions and 0 deletions

View File

@ -13,6 +13,8 @@ locales_list:
domain_name: '{{ ansible_domain }}'
configure_grub_cmdline_parameters: false
grub_cmdline_additional_parameters: ""
sysctl_custom_file: /etc/sysctl.d/90-custom-values.conf
sysctl_opts_reload: yes
sysctl_custom_file_state: present

View File

@ -0,0 +1,18 @@
- name: grub_cmdline_parameters | Manage additional grub command line options
tags:
- grub
- kernel
block:
- name: grub_cmdline_parameters | Install the grub command line configuration
ansible.builtin.template:
src: grub_cmdline.cfg.j2
dest: /etc/grub.d/99-grub-ansible-cmdline.cfg
owner: root
group: root
mode: "0644"
when: configure_grub_cmdline_parameters
- name: grub_cmdline_parameters | Remove the custom grub command line configuration
ansible.builtin.file:
dest: /etc/grub.d/99-grub-ansible-cmdline.cfg
state: absent
when: not configure_grub_cmdline_parameters

View File

@ -9,6 +9,8 @@
ansible.builtin.import_tasks: timezone.yml
- name: Sysctl kernel parameters
ansible.builtin.import_tasks: sysctl.yml
- name: Grub command line parameters
ansible.builtin.import_tasks: grub_cmdline_parameters.yml
- name: Additional network interfaces
ansible.builtin.import_tasks: network-interfaces.yml
- name: Create a directory that will contain the local generated certificates

View File

@ -0,0 +1 @@
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT {{ grub_cmdline_additional_parameters }}"