csmart / ansible-role-virt-infra

Define and manage guests and networks on a KVM host with Ansible
GNU General Public License v3.0
67 stars 48 forks source link

turn guest deps into variable #39

Closed csmart closed 3 years ago

csmart commented 3 years ago

By default we make sure that cloud-init and qemu-guest-agent are installed into the VM so that it can be configured on boot. If the image already includes them, then this step can be skipped. Furthermore, you might want to have different or additional packages installed.

This patch introduces a comma separated variable of virt_infra_guest_deps which defaults to the existing values of "cloud-init,qemu-guest-agent".

To skip installation of any packages, set this to an empty string in your inventory, e.g.

virt_infra_guest_deps: ""

If you want to install different packages then make a new list, e.g.: virt_infra_guest_deps: "cloud-init,qemu-guest-agent,vim,git,rsync"

As with all vars these can be at the host or group level.

This patch also includes vars/rhel.yml which was missing for RHEL hosts.

csmart commented 3 years ago

Tested and works with the defaults, empty list and custom list.