New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GCE Launch #2264
Fix GCE Launch #2264
Conversation
The Ansible GCE module (documentation here: http://docs.ansible.com/ansible/gce_module.html) requires a comma separated list when you pass an array here (even with a single element) the argument has square brackets around it and the instance doesn't get launched. Testing shows that joining with ', ' (comma space) works with one instance but breaks with two so I used ',' (comma no space).
Can one of the admins verify this patch? |
Can one of the admins verify this patch?
|
@menren mind taking a look at this? |
Hello, I do not have my workstation as I am on holiday, can't check now. According to this gce.py we can either pass a list or comma separated string for instance_names. For instance @bdurrow With which type of instances did you get error ? |
|
This is caused by a bug in ansible 2.1 that converts complex types to str when passed to module : ansible/ansible#16057 This bug would impact all modules which try to handle complex types. So for now we can pass all instances names as string to gce module as @bdurrow did. 👍 |
@abutcher what are your thoughts on this? Does this behavior still exist with the 2.2 pre-release build we are using? |
While the issue linked by @menren may be relevant, the documentation for the GCE module specifically calls for a comma separated string. I don't think that we should have any expectation that it would work with a list. I know the code implies a list will work but using an undocumented feature is unlikely to have good long term outcome. |
The Ansible GCE module (documentation here: http://docs.ansible.com/ansible/gce_module.html) requires a comma separated list when you pass an array here (even with a single element) the argument has square brackets around it and the instance doesn't get launched. Testing shows that joining with ', ' (comma space) works with one instance but breaks with two so I used ',' (comma no space).