I have a clouformation template that is working with no parameters defined , it’s working with no problems with CloufFormation in the AWS console but in order to use it in Ansible it is required to have parameters defined.
If I don’t define any parameters in ansible I get the following error :
If I set a parameter value in Ansible for the same template I get :
“”"
failed: [localhost] => {“failed”: true}
msg: {“Error”:{“Code”:“ValidationError”,“Message”:“Parameter values specified for a template which does not require them.”,“Type”:“Sender”},“RequestId”:“9b84302e-5064-11e3-bb60-872966d33ed4”}
FATAL: all hosts have already failed – aborting
“”"
Why do we need to set parameters in Ansible if we can use templates with no parameters at all in AWS ? Is there a way to overcome this issue or maybe start considering to remove the template_parameters as a required argument and make it optional ?
This is a very good question. I'm the module's original author. When
I wrote it, I didn't foresee people using CloudFormation templates
without parameters. That was short-sighted. Please feel free to
submit a pull request adding this feature.
At the moment I don’t have the knowledge and the time for the learning curve to write code and submit a pull request but hopefully I’ll be able to do that in the future as I’m planning to write my own modules at some point.
If anyone else willing to submit a pull request, besides removing the template parameters another good improvement will be to remove them completely when the state=absent as they don’t have any use at all when you delete a stack.
Thanks for this module James, it works really good