Commit Graph

30 Commits (29434b06b8e749edaa233545287247081067e0cd)

Author SHA1 Message Date
James Cammarata bd5cf57e76 Merge pull request #7653 from evanccopengeo/devel
ec2_group: Fix for 500 error when creating new security groups
10 years ago
James Cammarata b3bbca03d5 Add additional params to get_target_from_rule method in ec2_group
Fixes #7592
10 years ago
evanccopengeo fac9a64d23 fixing problem where ansible would error out because Amazon was saying the group didnt exist yet (needed to wait a few more seconds for amazon to propagate correctly) 10 years ago
CorbanR 42f54238e4 updating example, to be more consistent with parameter names 10 years ago
James Cammarata 713657d684 Make sure the default ec2_group egress rule is not removed
Upon a second run, the default egress rule will be removed when a
vpc is specified but no other egress rules were set. This patch
corrects that behavior by removing the default egress rule from the
list of unmatched outbound rules.

Fixes #7309
11 years ago
James Cammarata 1ef0402f03 Make sure a default allow out rule exists if no other egress rules do
Fixes #7027
11 years ago
willthames 509561f658 Moved AWS modules over to common module fragments
Created common module doc fragment, and applied to all
modules that use ec2_connect or connect_to_aws as
they definitely share the common doc fragments
11 years ago
Michael DeHaan 5b5ab78183 Add version_added to docs. 11 years ago
Maykel Moya 6a92d48b0f ec2_group: Document group_desc rule param 11 years ago
Maykel Moya a429ff26dc ec2_group: Add documentation for rules_egress 11 years ago
Maykel Moya b642e39e67 ec2_group: rules are not a required task argument 11 years ago
Maykel Moya 3156df9931 ec2_group: Request a fresh group object after creation
When a group is created, an egress_rule ALLOW ALL to 0.0.0.0/0 is added
automatically but it's not reflected in the object returned by the AWS API
call. After creation we re-read the group for getting an updated object.
11 years ago
Maykel Moya 649fcd3e1c ec2_group: Auto create missing groups referenced in rules
Suppose a pair of groups, A and B, depending on each other. One solution
for breaking the circular dependency at playbook level:

    - declare group A without dependencies
    - declare group B depending on A
    - declare group A depending on B

This patch breaks the dependency at module level. Whenever a depended-on
group is missing it's first created. This approach requires only two tasks:

    - declare group A depending on B (group B will be auto created)
    - declare group B depending on A

When creating a group EC2 requires you to pass the group description. In
order to fullfil this, rules now accept the `group_desc` param. Note
that group description can't be changed once the group is created so
it's nice to keep descriptions in sync.

Concrete example:

- ec2_group:
    name: mysql-client
    description: MySQL Client
    rules_egress:
      - proto: tcp
        from_port: 3306
        to_port: 3306
        group_name: mysql-server
        group_desc: MySQL Server

- ec2_group:
    name: mysql-server
    description: MySQL Server
    rules:
      - proto: tcp
        from_port: 3306
        to_port: 3306
        group_name: mysql-client
11 years ago
Maykel Moya 77d7165dde ec2_group: Deduplicate rule parsing/validation code 11 years ago
Maykel Moya f97243d6ed ec2_group: Add support for handling egress rules 11 years ago
James Cammarata 8ca3bb4137 Updating profile/security_token version_added labels 11 years ago
Will Thames b9a7352e0a Work to allow security tokens and profiles to work with Ansible
Allow security tokens and profiles to be used as arguments
to the 'common' ec2 modules

Mostly refactoring to provide two new methods,
`get_aws_connection_info`, which results in a dict that can be
passed through to the boto `connect_to_region` calls, and
`connect_to_aws` that can pass that dict through to the
`connect_to_region` method of the appropriate module.

Tidied up some variable names

Works around boto/boto#2100

profiles don't work with boto < 2.24, but this detects for that
and fails with an appropriate message. It is designed to work
if profile is not passed but boto < 2.24 is installed.

Modifications to allow empty aws auth variables to be passed
(this is useful if wanting to have the keys as an optional
parameter in ec2 calls - if set, use this value, if not set,
use boto config or env variables)

Reworked validate_certs improvements to work with refactoring

Added documentation for profile and security_token to affected modules
11 years ago
Patryk Zawadzki da1efee21f Properly match existing security group
If we don't care about `vpc_id` then neither should the code.
11 years ago
James Cammarata 056d54ebd3 Adding 'validate_certs' option to EC2 modules
When disabled, the boto connection will be instantiated without validating
the SSL certificate from the target endpoint. This allows the modules to connect
to Eucalyptus instances running with self-signed certs without errors.

Fixes #3978
11 years ago
Will Thames 7600c664fe Create a common EC2 connection argument spec for EC2 modules
Refactor the currently well-factored ec2 modules (i.e. those that already use ec2_connect) to
have a common argument spec. The idea is that new modules can use this spec without duplication
of code, and that new functionality can be added to the ec2 connection code (e.g. security
token argument)
11 years ago
jctanner 821858ed08 Merge pull request #5380 from dhml/devel
ec2_group: rules can't reference containing group fix #5309
11 years ago
David Hummel c5433d9742 Check for group_name and cidr_ip. 11 years ago
David Hummel bd67c6756a Add rule group_name parameter whose value can reference containing group name. 11 years ago
willthames 12005a1cd0 Move more responsibility to common EC2 module
Moved `AWS_REGIONS` into `ec2` module
Created `ec2_connect` method in `ec2` module
Updated modules able to use `ec2_connect` and `AWS_REGIONS`
11 years ago
Michael DeHaan f7c3975f21 Add version_added to all modules missing version_added information, the docs formatter will now
raise errors when omitted, updated changelog with new modules.
11 years ago
James Tanner afa5988391 Fixes #4540 Use shared module snippet to evaluate ec2 credentials 11 years ago
Brian Schott bdc8ea828e added aws_access_key and aws_secret_key aliases to ec2_group arguments 11 years ago
James Laska e002496f0e Add idempotency support to ec2_group 11 years ago
James Cammarata 77b98df63b Minor fix, vpc_id is not required for the ec2_group 11 years ago
Andrew de Quincey 58e85855e4 Add module to control EC2 security groups 11 years ago