# exception for cloudformation module

**URL:** <https://forum.ansible.com/t/exception-for-cloudformation-module/19672>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [November 2, 2015, 5:11pm UTC](https://forum.ansible.com/t/exception-for-cloudformation-module/19672 "2015-11-02T17:11:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clark\_Zheng](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Clark\_Zheng](https://forum.ansible.com/u/Clark_Zheng)\
**Post date:** [November 2, 2015, 5:11pm UTC](https://forum.ansible.com/t/exception-for-cloudformation-module/19672/1 "2015-11-02T17:11:07Z")

</div>

Hi,

When i execute playbook for cloudformation module on ubuntu 14, one exception will throw as: **_create\_stack() got an unexpected keyword argument ‘stack\_policy\_body’._**

Python version is 2.7 and python-boto has already been update to latest version via apt-get update.

Looks like this is caused by environment but i have no idea how to fix it on my workstation.

It’s appreciated for your comments.

Thanks

---

<div class="post-metadata">

**Author:** ![viper233](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/viper233/32/2060_2.png) [@viper233](https://forum.ansible.com/u/viper233)\
**Post date:** [November 9, 2015, 5:02pm UTC](https://forum.ansible.com/t/exception-for-cloudformation-module/19672/2 "2015-11-09T17:02:04Z")

</div>

Hi Clark,

which version of Ansible are you running? you can find this out by running

---

<div class="post-metadata">

**Author:** ![viper233](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/viper233/32/2060_2.png) [@viper233](https://forum.ansible.com/u/viper233)\
**Post date:** [November 9, 2015, 5:17pm UTC](https://forum.ansible.com/t/exception-for-cloudformation-module/19672/3 "2015-11-09T17:17:19Z")

</div>

Hi Clark,

which version of Ansible are you running? you can find this out by running

ansible --version

Can you provide the playbook you are using to call the cloudformation module and perhaps the cloudformation template?

It sounds like you should be using the parameter stack\_policy instead of stack\_policy\_body? or that you are passing something other than a string.

[http://boto.readthedocs.org/en/latest/ref/cloudformation.html?highlight=create\_stack#module-boto.cloudformation.connection](http://boto.readthedocs.org/en/latest/ref/cloudformation.html?highlight=create_stack#module-boto.cloudformation.connection)

[https://github.com/ansible/ansible-modules-core/blob/stable-1.9/cloud/amazon/cloudformation.py#L215](https://github.com/ansible/ansible-modules-core/blob/stable-1.9/cloud/amazon/cloudformation.py#L215) The stack\_policy\_body actually gets set to this parameter and then parsed in to create\_stack.

Thanks!
