# cloudformation create\_stack() got an unexpected keyword argument 'stack\_policy\_body'

**URL:** <https://forum.ansible.com/t/cloudformation-create-stack-got-an-unexpected-keyword-argument-stack-policy-body/20755>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [March 2, 2016, 11:52pm UTC](https://forum.ansible.com/t/cloudformation-create-stack-got-an-unexpected-keyword-argument-stack-policy-body/20755 "2016-03-02T23:52:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_G](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@John\_G](https://forum.ansible.com/u/John_G)\
**Post date:** [March 2, 2016, 11:52pm UTC](https://forum.ansible.com/t/cloudformation-create-stack-got-an-unexpected-keyword-argument-stack-policy-body/20755/1 "2016-03-02T23:52:21Z")

</div>

`Hi,`

`I am getting this error on Ubuntu 14.04.4 LTS. Any idea what is causing it?`

` `  
$ ansible-playbook go\_cloud.yml -vvvv  
Using /home/johng/Documents/ansible/ansible/ansible.cfg as config file  
Loaded callback default of type stdout, v2.0  
Loaded callback unnamed of type old, v1.0  
1 plays in go\_cloud.yml

PLAY \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ESTABLISH LOCAL CONNECTION FOR USER: johng  
127.0.0.1 EXEC /bin/sh -c ‘( umask 22 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1456960430.23-151711803624276`” && echo “`echo $HOME/.ansible/tmp/ansible-tmp-1456960430.23-151711803624276`” )’  
127.0.0.1 PUT /tmp/tmpt7aQZU TO /home/johng/.ansible/tmp/ansible-tmp-1456960430.23-151711803624276/setup  
127.0.0.1 EXEC /bin/sh -c ‘LANG=C LC\_ALL=C LC\_MESSAGES=C /usr/bin/python /home/johng/.ansible/tmp/ansible-tmp-1456960430.23-151711803624276/setup; rm -rf “/home/johng/.ansible/tmp/ansible-tmp-1456960430.23-151711803624276/” \> /dev/null 2\>&1’  
ok: [localhost]

TASK [Push hello-app cloudformation stack] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/johng/Documents/ansible/ansible/go\_cloud.yml:5  
ESTABLISH LOCAL CONNECTION FOR USER: johng  
127.0.0.1 EXEC /bin/sh -c ‘( umask 22 && mkdir -p “`echo $HOME/.ansible/tmp/ansible-tmp-1456960431.07-114836551388786`” && echo “`echo $HOME/.ansible/tmp/ansible-tmp-1456960431.07-114836551388786`” )’  
127.0.0.1 PUT /tmp/tmp4Pac7s TO /home/johng/.ansible/tmp/ansible-tmp-1456960431.07-114836551388786/cloudformation  
127.0.0.1 EXEC /bin/sh -c ‘LANG=C LC\_ALL=C LC\_MESSAGES=C /usr/bin/python /home/johng/.ansible/tmp/ansible-tmp-1456960431.07-114836551388786/cloudformation; rm -rf “/home/johng/.ansible/tmp/ansible-tmp-1456960431.07-114836551388786/” \> /dev/null 2\>&1’  
fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“aws\_access\_key”: “XXXXXXXXXXXXXXXXXXXX”, “aws\_secret\_key”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”, “disable\_rollback”: false, “ec2\_url”: null, “notification\_arns”: null, “profile”: null, “region”: “us-east-1”, “security\_token”: null, “stack\_name”: “ittest7”, “stack\_policy”: null, “state”: “present”, “tags”: null, “template”: “EC2InstanceWithSecurityGroupSample.template”, “template\_format”: “json”, “template\_parameters”: {“InstanceType”: “t2.micro”, “KeyName”: “sysadmin-key”}, “template\_url”: null, “validate\_certs”: true}, “module\_name”: “cloudformation”}, “msg”: “create\_stack() got an unexpected keyword argument ‘stack\_policy\_body’”}

msg: create\_stack() got an unexpected keyword argument ‘stack\_policy\_body’

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @go\_cloud.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=1 changed=0 unreachable=0 failed=1

` `

` `  
$ ansible --version  
ansible 2.0.1.0  
config file = /home/johng/Documents/ansible/ansible/ansible.cfg  
configured module search path = /usr/share/ansible  
$ cat /etc/lsb-release  
DISTRIB\_ID=Ubuntu  
DISTRIB\_RELEASE=14.04  
DISTRIB\_CODENAME=trusty  
DISTRIB\_DESCRIPTION=“Ubuntu 14.04.4 LTS”

` `

` `

---

<div class="post-metadata">

**Author:** ![John\_G](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@John\_G](https://forum.ansible.com/u/John_G)\
**Post date:** [March 3, 2016, 9:01pm UTC](https://forum.ansible.com/t/cloudformation-create-stack-got-an-unexpected-keyword-argument-stack-policy-body/20755/2 "2016-03-03T21:01:33Z")

</div>

Found my issue. It was picking up an old version of boto. I removed the deb package and reinstalled the pip version.

$ strace -o boto\_strace python -c ‘import boto; print boto. **version** ’  
2.20.1

# apt-get remove python-boto

# pip install --upgrade --force-reinstall boto

$ python -c ‘import boto; print boto. **version** ’  
2.39.0
