qemu_guest_agent als rolle (#110)
qemu_guest_agent als rolle Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#110 Co-Authored-By: mg <mg@noreply.git.mgrote.net> Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
parent
451bb91a99
commit
f408590a63
3 changed files with 25 additions and 5 deletions
|
@ -6,18 +6,15 @@
|
||||||
- { role: robertdebock.bootstrap, tags: "bootstrap", become: yes}
|
- { role: robertdebock.bootstrap, tags: "bootstrap", become: yes}
|
||||||
- { role: ryandaniels.create_users, tags: "user", become: yes}
|
- { role: ryandaniels.create_users, tags: "user", become: yes}
|
||||||
- { role: mgrote.r8152_kernel_module }
|
- { role: mgrote.r8152_kernel_module }
|
||||||
|
- { role: mgrote.qemu_guest_agent }
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: reboot für qemu-guest-agent (dauert bis zu 2min!)
|
|
||||||
become: true
|
|
||||||
reboot:
|
|
||||||
reboot_timeout: 120
|
|
||||||
- name: Change user password
|
- name: Change user password
|
||||||
become: true
|
become: true
|
||||||
user:
|
user:
|
||||||
name: mg
|
name: mg
|
||||||
update_password: always
|
update_password: always
|
||||||
password: "{{ lookup('keepass', 'mg_linux_password_hash', 'password') }}"
|
password: "{{ lookup('keepass', 'mg_linux_password_hash', 'password') }}"
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
### reobertdebock.bootstrap
|
### reobertdebock.bootstrap
|
||||||
bootstrap_user: mg
|
bootstrap_user: mg
|
||||||
|
|
9
roles/mgrote.qemu_guest_agent/README.md
Normal file
9
roles/mgrote.qemu_guest_agent/README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
## mgrote.qemu_guest_agent
|
||||||
|
|
||||||
|
### Beschreibung
|
||||||
|
Installiert den qemu-guest-agent und startet die VM danach neu.
|
||||||
|
Wird nur in VMs ausgeführt.
|
||||||
|
|
||||||
|
### Funktioniert auf
|
||||||
|
- [x] Ubuntu (>=18.04)
|
||||||
|
- [x] Debian
|
14
roles/mgrote.qemu_guest_agent/tasks/main.yml
Normal file
14
roles/mgrote.qemu_guest_agent/tasks/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
- name: install packages
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: qemu-guest-agent
|
||||||
|
state: present
|
||||||
|
when: ansible_virtualization_role == 'guest'
|
||||||
|
register: qemu_installed
|
||||||
|
|
||||||
|
- name: reboot (dauert bis zu 2min!)
|
||||||
|
become: true
|
||||||
|
reboot:
|
||||||
|
reboot_timeout: 120
|
||||||
|
when: qemu_installed.changed == true
|
Loading…
Reference in a new issue