feat: initial commit
This commit is contained in:
commit
072a1ed764
36 changed files with 1089 additions and 0 deletions
35
roles/vps/tasks/main.yml
Normal file
35
roles/vps/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
# https://support.solusvm.com/hc/en-us/articles/21334950006807-How-to-install-Guest-Tools-manually-inside-a-VM-in-SolusVM-2
|
||||
|
||||
- name: install required packages
|
||||
apt:
|
||||
pkg:
|
||||
- qemu-guest-agent
|
||||
- cloud-init
|
||||
- tuned
|
||||
state: latest
|
||||
cache_valid_time: 3600
|
||||
become: true
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
||||
- name: install required packages
|
||||
dnf:
|
||||
name:
|
||||
- qemu-guest-agent
|
||||
- cloud-init
|
||||
- tuned
|
||||
state: latest
|
||||
update_cache: true
|
||||
become: true
|
||||
when: ansible_distribution == 'AlmaLinux'
|
||||
|
||||
- name: check tuned profile
|
||||
command: tuned-adm active
|
||||
register: vps_tuned_profile
|
||||
become: true
|
||||
changed_when: false
|
||||
|
||||
- name: start tuned profile
|
||||
shell: tuned-adm profile virtual-guest
|
||||
become: true
|
||||
when: "'virtual-guest' not in vps_tuned_profile.stdout"
|
Loading…
Add table
Add a link
Reference in a new issue