Storage Roles Usage Guide
Tip
All storage roles have the ability to generate host_vars templates when the generate_host_vars tag is used. This allows you to run the playbooks to generate the necessary variables before actually provisioning storage. For example, you can run the following command to generate host variables for all Azure Windows hosts provisioned with managed disks:
-
Create a file in
host_varsfor each host storage will be provisioned on. The file should be named after the host's inventory name (e.g.host_vars/prdodb.yml). -
Define the variables for the storage role in the host file created in step 1. The variable structure is different for Windows and Linux. See examples in
Templates. -
Finally, run the playbook for the storage role to provision storage on the host(s). For example, to provision storage on all Azure Windows hosts provisioned with managed disks, run the following command:
Note
Be sure to run the appropriate playbook for the host's operating system and cloud provider.