If the KVM virtual machine we want to deploy is hosted on a CentOS KVM host and hosted within the Community Cage
(Red Hat) DC, same thing as for bare-metal host : add it in the Internal Inventory, and start also "reserving" IP address[es] for Operating System.
Then add the new node to <inventory>/host_vars/<new_node> and also in the <inventory>/kvm file/group (for inheritance).
Ensure that all the variables explained in adhoc-deploy-kvm-guest playbook are set correctly.
Then you can call it like that :
ansible-playbook playbooks/adhoc-deploy-kvm-guest.yml [WARNING] KVM guests to be deployed with CentOS => : <kvm_guest[s]>
The process will go like this :
virt-install
script that will inject the kickstart into initrd on demandvirt-install
wrapper script for the kvm guest