ansible/ansible — pull request #8451 by stewrutledge (2014-08-05 06:59:57+00:00)
Title: Added a vm_extra_config option for the folder in which the VM is created

Copy of https://github.com/ansible/ansible/pull/8157 with own branch, cleaned up to make pull request easier.

Added a section in vm_extra_config (folder) which allows you to specify which vm folder the new guest should be created in.

First there is a check that the folder exists on the system, failing if it doesn't.

If it does exist, the vmfmor variable is set to the first key (I am not sure how this behaves if there are multiple folders with the same name) found in the dictionary returned by _get_managed_objects.

If it is not set, it just goes to the current default (the root folder on the datacenter/host).

```
args:
vm_extra_config:
vcpu.hotadd: yes
mem.hotadd: yes
notes: This is a test VM
folder: AutoDeploy
```