Commit Graph

84 Commits (819ba2259d0879c5ee6a2b8eccee19fe7bfaedff)

Author SHA1 Message Date
Alex Lo ac74520b6f ec2_group: description property is immutable (#19790)
* update integration tests for updated boto exception message

* integration tests fail on both "test credential" test cases

exception bubbles out of module.  instead catch and wrap

* ec2_group does not support updating a security group's description

AWS security group descriptions are immutable.
if ec2_group finds a group that matches by name, but the descriptions do not match, the module does not support this case
previously it would check if the group was used, but would not do anything if it was

old behavior was erroneous because it could make a user expect that the description change of a group was fine when in fact it did not occur
also, it made an expensive check against all ec2 instances for no good reason

* comments not doc strings

* else must have pass w/o doc-string statement

* Catch specific BotoServerException, give context around error when fetching SGs

* python3 compatible exception blocks

* add traceback to fail_json

* two blank lines before first function
9 years ago
Sloane Hertel 8ccde6fbb0 [cloud] make docs for ec2_group rules more clear (#22701)
make ec2_group pep8

removed ec2_group from pep8 legacy files
9 years ago
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
9 years ago
Alex Lo 8e910cce8a ec2_group: description is only required when group state is present (#19791)
* description is only required when group state is present

also note that AWS requires a non-empty description when creating a security group

* clarify description requirement
9 years ago
Matt Clay 10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
9 years ago
Toshio Kuratomi 51491c9904 Remove itervalues (not available on py3) 9 years ago
Tom Paine 1d80f5cf0f Update ec2_group.py (#19033)
PR move of https://github.com/ansible/ansible-modules-core/pull/3588

##### ISSUE TYPE
- Docs Pull Request

##### COMPONENT NAME
ec2_group.py

##### ANSIBLE VERSION

```
ansible 2.0.2.0
  config file = /Users/tpai/src/cm-secure/ansible.cfg
  configured module search path = Default w/o overrides
```
##### SUMMARY

Make it clear you can specify the created group in the rules list, allowing idempotent use for group<->group networking rules.

This is a really useful feature that isn't obvious enough in the docs.
9 years ago
James Cammarata 8afa090417 Resolving differences in core modules post-merge 9 years ago
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 9 years ago
Fabio Alessandro Locati c8fd24ee04 Call main in conditional way - cloud/amazon 9 years ago
Kenny Woodson 3cb42fc5dd Fix for validate rule. Ensure rule is a dict. (#4640) 9 years ago
Shawn Siefkas 66f1f6d537 Check mode fix for ec2_group module (#2184)
The default VPC egress rules was being left in the egress rules for
purging in check mode.  This ensures that the module returns the correct
change state during check mode.
9 years ago
Shaun Brady 04199140c5 Make group_name resolution VPC aware
EC2 Security Group names are unique given a VPC.  When a group_name
value is specified in a rule, if the group_name does not exist in the
provided vpc_id it should create the group as per the documentation.

The groups dictionary uses group_names as keys, so it is possible to
find a group in another VPC with the name that is desired.  This causes
an error as the security group being acted on, and the security group
referenced in the rule are in two different VPCs.

To prevent this issue, we check to see if vpc_id is defined and if so
check that VPCs match, else we treat the group as new.
9 years ago
Michael Pappas 585003c546 Prevent ec2group from deleting sgs during check_mode runs 9 years ago
@ 3fa745eef9 Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing compile time errors IRT error exception handling for Python 3.5.
This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
9 years ago
Neil Saunders 83039b93f0 Fix for issue #3109: Executing ec2_group with rules fails with "Invalid rule parameter '['" 9 years ago
Selivanov Pavel 63d2575f9f ec2_group.py: added ICMP rule example 9 years ago
Mike Putnam 9623cd570c Add missing GPLv3 License header
Fixes #1643
9 years ago
Greg DeKoenigsberg 18ca7aee07 Updating cloud modules with proper github author information 9 years ago
Robert Estelle a41994974c EC2 Security Group - Validate parameters. 9 years ago
Benno Joy f6f2359400 fix for 11177 where module readds rule even if the rules exists 9 years ago
Brian Coca 5ae6f5b767 reverting pep changes that were breaking documentation 9 years ago
marko de813195c5 Added support for foreign security groups (Fixes: #373) 9 years ago
zimbatm 933256fc63 ec2_group: prioritise current VPC group names over others 9 years ago
zimbatm c3e720a393 ec2_group: select own group if the name matches
This fixes an issue where multiple VPC have the same group name and
the one from the other VPC is selected.
9 years ago
(@cewood) 17b5d851f2 Support specifying cidr_ip as a list
Update/fix to Support specifying cidr_ip as a list

Unicode isn't compatible with python2, so we needed some other
solution to this problem. The simplest approach is if the ip item
isn't already a list, simply convert it to one, and we're done.
Thanks to @mspiegle for this suggestion.
9 years ago
steenzout 67f769d9a6 issue #994: use HAS_BOTO to determine if import was successful: - removed import of sys module. - HAS_BOTO constant to check if import was successful. - trigger a failure when import fails. - removed unnecessary imports. 9 years ago
Robert Estelle 268763995c ec2_group allow empty rules. 9 years ago
Joel Thompson 646657e325 Fixes issue 697 -- only purge the grants that need to be purged 9 years ago
Kale Franz 7c8f0b99af #531 correction
correct list comprehension for older versions of python (back to python 2.4)
9 years ago
Kale Franz eac743dc39 fixes #529 ec2_group module bug 9 years ago
Michael DeHaan 76efaa6cfb More EC2 doc tweaks 9 years ago
follower 4889701874 Fix typo of "rules_egress"
Or is "rules_egree" supposed to be a plural? The sentence is difficult to parse.

Maybe the correct fix is to "Purge existing rules on security group that are not found in rules_egress"?
9 years ago
Brian Coca 32e85c0944 made subcategories for cloud modules for better organization 9 years ago