ansible/ansible — pull request #5916 by tidzo (2014-02-08 23:04:11+00:00)
Title: Fix for #4992 - Add userdata to cloud/nova_compute

In common with the submitter of issue #4992 , I needed to create VMs on an OpenStack using the nova_compute module but it didn't have support for the userdata parameter. Simple addition, only complication is that the underlying novaclient calls it 'userdata' but for consistency with the ec2 module, I've hyphenated the param to user_data. I tested by adding this to my nova_compute task:

user_data: "#!/bin/bash\necho Hello > /tmp/output\n"

The VM launched then had the expected text in the expected file.

Note that a future improvement would be to allow a filename to be passed in and the contents of that file sent to novaclient - but this scratches my immediate itch :-)