Adding the `always` tag to the tasks in `dyngroups.yml` ensures that
hosts will get added to the appropriate groups dynamically, even when
running a subset of tasks by targeting specific tags. Ansible will
always run tasks with this tag when a tag selection is passed to
`ansible-playbook`.
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.
The `dyngroups.yml` playbook groups hosts dynamically based on gathered
facts. Currently, the `ansible_os_family` fact is used to group hosts by
Linux distribution.