Files
community.general/library/cloud
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
2014-03-20 17:24:17 +01:00
..
2014-03-18 11:57:01 +00:00
2014-03-20 09:21:10 -05:00
2014-03-15 19:16:14 +13:00
2014-03-14 12:01:23 -04:00
2014-03-17 00:23:16 +13:00
2014-03-11 12:02:04 -04:00
2014-01-28 20:29:41 -05:00
2014-02-07 20:47:57 -05:00
2013-11-21 15:46:25 -06:00
2013-12-06 16:49:28 -06:00
2014-02-14 10:47:27 -06:00
2014-03-13 16:18:50 -05:00
2014-03-13 16:18:50 -05:00
2014-02-10 22:40:38 -05:00
2013-11-21 15:46:25 -06:00