What is the error that you get when it fails?
$ ansible-playbook configure-security-group.yaml -e "key_name=$EC2_KEY_NAME"
PLAY [Provision Cassandra cluster security group] *****************************
GATHERING FACTS ***************************************************************
ok: [127.0.0.1]
TASK: [Create security group] *************************************************
failed: [127.0.0.1 -> 127.0.0.1] => {"failed": true, "parsed": false}
Traceback (most recent call last):
File "/home/tzach/.ansible/tmp/ansible-tmp-1421306914.46-15410053363176/ec2_group", line 2145, in <module>
main()
File "/home/tzach/.ansible/tmp/ansible-tmp-1421306914.46-15410053363176/ec2_group", line 293, in main
group.authorize(rule['proto'], rule['from_port'], rule['to_port'], ip, grantGroup)
File "/usr/lib/python2.7/site-packages/boto-2.28.0-py2.7.egg/boto/ec2/securitygroup.py", line 204, in authorize
dry_run=dry_run)
File "/usr/lib/python2.7/site-packages/boto-2.28.0-py2.7.egg/boto/ec2/connection.py", line 3152, in authorize_security_group
params, verb='POST')
File "/usr/lib/python2.7/site-packages/boto-2.28.0-py2.7.egg/boto/connection.py", line 1196, in get_status
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidPermission.Duplicate</Code><Message>the specified rule "peer: sg-36327b53, TCP, from port: 7000, to port: 7000, ALLOW" already exists</Message></Error></Errors><RequestID>8a36dc12-10e6-400c-8f27-c482a1c32c6e</RequestID></Response>
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/tzach/configure-security-group.yaml.retry127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/eHKIyOeGFK0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c9b008e5-69cd-4a19-8db7-6c3395915bad%40googlegroups.com.