base: Enable serial console on KVM VMs
Occasionally, VMs running on the main libvirt VM hosts will freeze or otherwise become unavailable via network. Sometimes, when this happens, their normal consoles are unresponsive as well. Having the serial console available as a fallback can sometimes be helpful in recovering from such situations. To ensure the serial console is available on all VMs, we use a "dynamic" group, based on the virtualization type and role of the managed node. All KVM-based virtual machines are included in a group named *kvm-vm*. A play in `base.yml` applies the *serial-console* role to members of this group.jenkins-master
parent
8b91265ffe
commit
00d30a67fb
4
base.yml
4
base.yml
|
@ -1,3 +1,7 @@
|
|||
- import_playbook: dyngroups.yml
|
||||
- hosts: all
|
||||
roles:
|
||||
- base
|
||||
- hosts: kvm-guest
|
||||
roles:
|
||||
- serial-console
|
||||
|
|
|
@ -3,4 +3,10 @@
|
|||
tasks:
|
||||
- name: group hosts by distribution
|
||||
group_by:
|
||||
key={{ ansible_os_family }}
|
||||
key: '{{ ansible_os_family }}'
|
||||
changed_when: false
|
||||
- name: group hosts by virtualization
|
||||
group_by:
|
||||
key: >-
|
||||
{{ ansible_virtualization_type }}-{{ ansible_virtualization_role }}
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in New Issue