Initial import; migrate some roles from irl.wip
This commit is contained in:
commit
2ba6c6691b
44 changed files with 1573 additions and 0 deletions
52
roles/baseline/tasks/solusvm.yml
Normal file
52
roles/baseline/tasks/solusvm.yml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
# 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
|
||||
ansible.builtin.dnf:
|
||||
name:
|
||||
- qemu-guest-agent
|
||||
- cloud-init
|
||||
- tuned
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: SolusVM Guest | PATCH | Enable and start tuned
|
||||
ansible.builtin.systemd_service:
|
||||
name: tuned
|
||||
enabled: true
|
||||
state: started
|
||||
become: true
|
||||
|
||||
- name: SolusVM Guest | AUDIT | Check for tuned profile
|
||||
ansible.builtin.command: tuned-adm active
|
||||
register: vps_tuned_profile
|
||||
become: true
|
||||
changed_when: false
|
||||
|
||||
- name: SolusVM Guest | PATCH | Start tuned profile (virtual-guest)
|
||||
ansible.builtin.shell: tuned-adm profile virtual-guest
|
||||
become: true
|
||||
when: "'virtual-guest' not in vps_tuned_profile.stdout"
|
||||
|
||||
- name: SolusVM Guest | PATCH | Remove console=ttyS0,115200n8 from bootloader configurations
|
||||
ansible.builtin.replace:
|
||||
path: "{{ item }}"
|
||||
regexp: 'console=ttyS0,115200n8'
|
||||
replace: ''
|
||||
with_items:
|
||||
- /etc/default/grub
|
||||
- /etc/sysconfig/bootloader
|
||||
when: ansible_distribution == 'Rocky'
|
||||
notify:
|
||||
- Regenerate grub config
|
||||
|
||||
- name: SolusVM Guest | AUDIT | Find all vmlinuz-* files in /boot
|
||||
ansible.builtin.find:
|
||||
paths: /boot
|
||||
patterns: 'vmlinuz-*'
|
||||
register: baseline_solusvm_kernels
|
||||
|
||||
- name: SolusVM Guest | PATCH | Remove console=ttyS0,115200n8 from existing kernel bootloader entries
|
||||
ansible.builtin.command:
|
||||
cmd: "grubby --update-kernel={{ item.path }} --remove-args='console=ttyS0,115200n8'"
|
||||
with_items: "{{ baseline_solusvm_kernels.files }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue