Home > Storage > PowerMax and VMAX > Storage Admin > Dell PowerMax: Ansible Modules Best Practices > Creating Hosts and Host Groups
To provision storage for an application, you must define the hosts that will access the storage devices on the array. Both the host and hostgroup modules are similar in their use. A host is defined by a list of unique 16-digit World Wide Names (WWN) or iSCSI Qualified Names (IQN) up to 128 characters.
Creating the host is a simple task with a few inputs, as shown in Figure 8. The initiators are being passed in as variables.
The host_type variable is optional and can be set to default or HP-UX. If you are provisioning for another operating system type, such as OpenVMS, use the optional host_flags parameter. You can find other examples of YAML code in the Ansible-doc pages for the module or on GitHub here.
Creating a host group is similar to creating a host. The only difference in the module is that instead of passing the initiators parameter, the hostgroup module takes a list of hosts, and hosts are added and removed with the host_state parameter. Functional examples are detailed in Ansible-doc and on GitHub here. Host groups are generally used in cluster configurations when volumes need to be accessed and visible to multiple hosts.