feat(baseline): do not expect global become true

This commit is contained in:
Iain Learmonth 2025-12-20 13:14:35 +00:00
parent c793b470b0
commit 6933aad1fa
8 changed files with 56 additions and 8 deletions

View file

@ -1,6 +1,7 @@
---
# https://support.solusvm.com/hc/en-us/articles/21334950006807-How-to-install-Guest-Tools-manually-inside-a-VM-in-SolusVM-2
- name: SolusVM Guest | PATCH | Install required packages
become: true
ansible.builtin.dnf:
name:
- qemu-guest-agent
@ -8,27 +9,27 @@
- tuned
state: latest
update_cache: true
become: true
- name: SolusVM Guest | PATCH | Enable and start tuned
become: true
ansible.builtin.systemd_service:
name: tuned
enabled: true
state: started
become: true
- name: SolusVM Guest | AUDIT | Check for tuned profile
become: true
ansible.builtin.command: tuned-adm active
register: _baseline_solusvm_tuned_profile
become: true
changed_when: false
- name: SolusVM Guest | PATCH | Start tuned profile (virtual-guest)
ansible.builtin.command: tuned-adm profile virtual-guest
become: true
ansible.builtin.command: tuned-adm profile virtual-guest
when: "'virtual-guest' not in _baseline_solusvm_tuned_profile.stdout"
- name: SolusVM Guest | PATCH | Remove console=ttyS0,115200n8 from bootloader configurations
become: true
ansible.builtin.replace:
path: "{{ item }}"
regexp: 'console=ttyS0,115200n8'
@ -41,12 +42,14 @@
- Regenerate grub config
- name: SolusVM Guest | AUDIT | Find all vmlinuz-* files in /boot
become: true
ansible.builtin.find:
paths: /boot
patterns: 'vmlinuz-*'
register: baseline_solusvm_kernels
- name: SolusVM Guest | PATCH | Remove console=ttyS0,115200n8 from existing kernel bootloader entries
become: true
ansible.builtin.command:
cmd: "grubby --update-kernel={{ item.path }} --remove-args='console=ttyS0,115200n8'"
with_items: "{{ baseline_solusvm_kernels.files }}"