{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3053","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3053/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3053/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3053/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/3053","id":134148567,"number":3053,"title":"ansible 2.0.0.2 - aws ec2_group - rules_egress not working ","user":{"login":"sarlindo","id":6406166,"avatar_url":"https://avatars.githubusercontent.com/u/6406166?v=3","gravatar_id":"","url":"https://api.github.com/users/sarlindo","html_url":"https://github.com/sarlindo","followers_url":"https://api.github.com/users/sarlindo/followers","following_url":"https://api.github.com/users/sarlindo/following{/other_user}","gists_url":"https://api.github.com/users/sarlindo/gists{/gist_id}","starred_url":"https://api.github.com/users/sarlindo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarlindo/subscriptions","organizations_url":"https://api.github.com/users/sarlindo/orgs","repos_url":"https://api.github.com/users/sarlindo/repos","events_url":"https://api.github.com/users/sarlindo/events{/privacy}","received_events_url":"https://api.github.com/users/sarlindo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-17T01:26:23Z","updated_at":"2016-02-18T00:04:24Z","closed_at":null,"body":"## Environment \r\nAnsible 2.0.0.2\r\nUbuntu 14.03\r\nAWS\r\n\r\n## The issue\r\n\r\nI am trying to apply outbound firewall rules to AWS using the rules_egress: However, when I log into my AWS account and look at the winrdp security group, all I see are the inbound rules and no outbound rules.\r\n\r\n### dev-environment.yml\r\n\r\n````\r\n# security groups to be created\r\nsecurity_groups:\r\n  - name: winrdp\r\n    desc: the security group for the winrdp server\r\n    rules:\r\n      - proto: tcp\r\n        from_port: 5986\r\n        to_port: 5986\r\n        cidr_ip: 0.0.0.0/0\r\n      - proto: tcp\r\n        from_port: 3389\r\n        to_port: 3389\r\n        cidr_ip: 0.0.0.0/0\r\n    rules_egress:\r\n      - proto: all\r\n        cidr_ip: 0.0.0.0/0\r\n````\r\n### playbook\r\n````\r\n---\r\n- name: Provision ec2 instances based on the environment\r\n  hosts: localhost\r\n  connection: local\r\n  gather_facts: False\r\n\r\n  vars_files:\r\n    - vars/dev-environment.yml\r\n    - vars/aws-creds.yml\r\n\r\n  tasks:\r\n\r\n  - name: Create required security groups\r\n    ec2_group:\r\n      name: \"{{ item.name }}\"\r\n      description: \"{{ item.desc }}\"\r\n      rules: \"{{ item.rules }}\"\r\n      region: \"{{ ec2_region }}\"\r\n      ec2_access_key: \"{{ ec2_access_key }}\"\r\n      ec2_secret_key: \"{{ ec2_secret_key }}\"\r\n    with_items: security_groups\r\n````\r\n![screenshot from 2016-02-16 20 31 24](https://cloud.githubusercontent.com/assets/6406166/13097103/63c440a8-d4ec-11e5-8769-2ecc6f1c651e.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/185467630","html_url":"https://github.com/ansible/ansible-modules-core/issues/3053#issuecomment-185467630","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/3053","id":185467630,"user":{"login":"sarlindo","id":6406166,"avatar_url":"https://avatars.githubusercontent.com/u/6406166?v=3","gravatar_id":"","url":"https://api.github.com/users/sarlindo","html_url":"https://github.com/sarlindo","followers_url":"https://api.github.com/users/sarlindo/followers","following_url":"https://api.github.com/users/sarlindo/following{/other_user}","gists_url":"https://api.github.com/users/sarlindo/gists{/gist_id}","starred_url":"https://api.github.com/users/sarlindo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarlindo/subscriptions","organizations_url":"https://api.github.com/users/sarlindo/orgs","repos_url":"https://api.github.com/users/sarlindo/repos","events_url":"https://api.github.com/users/sarlindo/events{/privacy}","received_events_url":"https://api.github.com/users/sarlindo/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T00:04:24Z","updated_at":"2016-02-18T00:04:24Z","body":"documentation for purge_rules_rules says \"Purge existing rules_egress on security group that are **_NOT_** found in rules_egress\".\r\n\r\nI also added this option purge_rules_egress to false, but still nothing. Do you have an example of this working? the example in the document shows rules_egress, but not purge_rules_egress.\r\n"}}