These ENV vars are:
- CLOUDSTACK_ZONE
- CLOUDSTACK_DOMAIN
- CLOUDSTACK_ACCOUNT
- CLOUDSTACK_PROJECT
help to DRY on every task, args still have precedence.
@ -97,6 +97,43 @@ Or by looping over a regions list if you want to do the task in every region:
- exmaple_cloud_one
- exmaple_cloud_two
Environment Variables
`````````````````````
..versionadded:: 2.3
Since Ansible 2.3 it is possible to use environment variables for domain (``CLOUDSTACK_DOMAIN``), account (``CLOUDSTACK_ACCOUNT``), project (``CLOUDSTACK_PROJECT``) and zone (``CLOUDSTACK_ZONE``). This simplifies the tasks by not repeating the arguments for every tasks.
Below you see an example how it can be used in combination with Ansible's block feature:
..Note:: You are still able overwrite the environment variables using the module arguments, e.g.``zone: sf-2``
..Note:: Unlike ``CLOUDSTACK_REGION`` these additional environment variables are ingored in the CLI ``cs``.
Use Cases
`````````
The following should give you some ideas how to use the modules to provision VMs to the cloud. As always, there isn't only one way to do it. But as always: keep it simple for the beginning is always a good start.