98 lines
3.8 KiB
YAML
98 lines
3.8 KiB
YAML
---
|
|
# ---------------------------------------------------
|
|
# configuration de grub
|
|
# ---------------------------------------------------
|
|
|
|
# ---------------------------------------------------
|
|
# suppression de rhgb
|
|
# ---------------------------------------------------
|
|
- name: check if rhgb is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep rhgb | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - Suppression de rhgb
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --remove-args=rhgb
|
|
when: grep_count.stdout != '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# suppression de quiet
|
|
# ---------------------------------------------------
|
|
- name: check if quiet is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep quiet | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - Suppression de quiet
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --remove-args=quiet
|
|
when: grep_count.stdout != '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# ajout de transparent_hugepage=never
|
|
# ---------------------------------------------------
|
|
- name: check if transparent_hugepage=never is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep -i transparent_hugepage=never | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - Désactivation de Transparent Hugepages
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --args=transparent_hugepage=never
|
|
when: grep_count.stdout == '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# ajout de numa=off
|
|
# ---------------------------------------------------
|
|
- name: check if numa=off is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep -i numa=off | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - Désactivation de numa=off
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --args=numa=off
|
|
when: grep_count.stdout == '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# ajout de elevator=deadline
|
|
# ---------------------------------------------------
|
|
- name: check if elevator=deadline is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep -i elevator=deadline | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - elevator=deadline
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --args=elevator=deadline
|
|
when: grep_count.stdout == '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# ajout de vga=791
|
|
# ---------------------------------------------------
|
|
- name: check if vga=791 is set
|
|
ansible.builtin.shell: grubby --info DEFAULT | grep -i vga=791 | wc -l
|
|
register: grep_count
|
|
tags: grub
|
|
|
|
- name: Configuration grub - vga=791
|
|
ansible.builtin.shell: grubby --update-kernel=ALL --args=vga=791
|
|
when: grep_count.stdout == '0' and ansible_distribution_major_version >= '7'
|
|
tags: grub
|
|
|
|
# ---------------------------------------------------
|
|
# ajout de GRUB_ENABLE_BLSCFG=true
|
|
# Workaround of Orabug 20734786
|
|
# ---------------------------------------------------
|
|
# - name: check if GRUB_ENABLE_BLSCFG=true is set
|
|
# ansible.builtin.shell: grubby --info DEFAULT | grep -i GRUB_ENABLE_BLSCFG=true | wc -l
|
|
# register: grep_count
|
|
# tags: grub
|
|
#
|
|
# - name: Configuration grub - GRUB_ENABLE_BLSCFG=true
|
|
# ansible.builtin.shell: grubby --update-kernel=ALL --args=GRUB_ENABLE_BLSCFG=true
|
|
# when: grep_count.stdout == '0' and ansible_distribution_major_version >= '7'
|
|
# tags: grub
|
|
|