This section is more relevant to resource management than to the hosts themselves. Any of the preceding use cases can be used for either bare metal or virtual hosts that are located locally or on the cloud.
Note
The wake-on-LAN modules are less useful in a cloud or virtual environment. It is easier to manage virtual hosts and instances using the dedicated modules for their controllers.
In this subsection, we will look at some use cases for host management in a VMware environment, including managing the infrastructure around them.
This use case shows how to create virtual machines from a predefined template. After that, we make sure that all the VMs have been added to the inventory with the right parameters:
--- - name: Create a virtual machine from a template hosts: localhost gather_facts: False tasks: - name: Create a virtual machine vmware_guest: ...