Skip to content

Commit

Permalink
Merge pull request CentOS-PaaS-SIG#557 from herlo/aws_sg_list
Browse files Browse the repository at this point in the history
  • Loading branch information
paas-bot committed Apr 25, 2018
2 parents da9ad0c + 647ec38 commit d561492
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 30 deletions.
50 changes: 25 additions & 25 deletions docs/source/aws.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ Within Linchpin, the :term:`aws_ec2` :term:`resource_definition` has more
options than what are shown in the examples above. For each :term:`aws_ec2`
definition, the following options are available.

+------------------+------------+----------+-------------------+-----------------+
| Parameter | required | type | ansible value | comments |
+==================+============+==========+===================+=================+
| role | true | string | N/A | |
+------------------+------------+----------+-------------------+-----------------+
| name | true | string | instance_tags | name is set as |
| | | | | an instance_tag |
| | | | | value. |
+------------------+------------+----------+-------------------+-----------------+
| flavor | true | string | instance_type | |
+------------------+------------+----------+-------------------+-----------------+
| image | true | string | image | |
+------------------+------------+----------+-------------------+-----------------+
| region | false | string | region | |
+------------------+------------+----------+-------------------+-----------------+
| count | false | integer | count | |
+------------------+------------+----------+-------------------+-----------------+
| keypair | false | string | key_name | |
+------------------+------------+----------+-------------------+-----------------+
| security_group | false | string | group | |
+------------------+------------+----------+-------------------+-----------------+
| vpc_subnet_id | false | string | vpc_subnet_id | |
+------------------+------------+----------+-------------------+-----------------+
| assign_public_ip | false | string | assign_public_ip | |
+------------------+------------+----------+-------------------+-----------------+
+------------------+------------+---------------+-------------------+-----------------+
| Parameter | required | type | ansible value | comments |
+==================+============+===============+===================+=================+
| role | true | string | N/A | |
+------------------+------------+---------------+-------------------+-----------------+
| name | true | string | instance_tags | name is set as |
| | | | | an instance_tag |
| | | | | value. |
+------------------+------------+---------------+-------------------+-----------------+
| flavor | true | string | instance_type | |
+------------------+------------+---------------+-------------------+-----------------+
| image | true | string | image | |
+------------------+------------+---------------+-------------------+-----------------+
| region | false | string | region | |
+------------------+------------+---------------+-------------------+-----------------+
| count | false | integer | count | |
+------------------+------------+---------------+-------------------+-----------------+
| keypair | false | string | key_name | |
+------------------+------------+---------------+-------------------+-----------------+
| security_group | false | string / list | group | |
+------------------+------------+---------------+-------------------+-----------------+
| vpc_subnet_id | false | string | vpc_subnet_id | |
+------------------+------------+---------------+-------------------+-----------------+
| assign_public_ip | false | string | assign_public_ip | |
+------------------+------------+---------------+-------------------+-----------------+

EC2 Inventory Generation
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
7 changes: 5 additions & 2 deletions docs/source/examples/workspace/topologies/aws-ec2-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ resource_groups:
image: ami-984189e2
count: 1
instance_tags:
color: blue
shape: oval
color: blue
shape: oval
security_group:
- default
- public
credentials:
filename: aws.key
profile: default
2 changes: 1 addition & 1 deletion linchpin/provision/roles/aws/files/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"image": { "type": "string", "required": false },
"count": { "type": "integer", "required": false },
"keypair": { "type": "string", "required": false },
"security_group": { "type": "string", "required": false },
"security_group": { "type": ["list", "string"], "required": false },
"vpc_subnet_id": { "type": "string", "required": false },
"assign_public_ip": { "type": "boolean", "required": false },
"instance_tags": { "type": "dict", "required": false }
Expand Down
2 changes: 1 addition & 1 deletion linchpin/provision/roles/aws/tasks/provision_aws_ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- name: Update Instance Tags
set_fact:
instance_tags: "{{ res_grp_vars | selectattr('resource_group_name', 'match', '^' + res_grp_name + '$') | first | combine( res_def['instance_tags'] ) }}"
instance_tags: "{{ res_grp_vars | selectattr('resource_group_name', 'match', '^' + res_grp_name + '$') | first | combine( res_def['instance_tags'] | default({}) ) }}"

- name: "Provisioning AWS_EC2 Resource when not async"
ec2:
Expand Down
2 changes: 1 addition & 1 deletion linchpin/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__short_version__ = '1.5.3'
__version__ = '1.5.3a'
__version__ = '1.5.3a1'

0 comments on commit d561492

Please sign in to comment.