This repository was archived by the owner on Jun 23, 2021. It is now read-only.
Add verification tasks, always tag NAT gateways, and fix typos#57
Open
johnsimcall wants to merge 4 commits intojaredhocutt:masterfrom
Open
Add verification tasks, always tag NAT gateways, and fix typos#57johnsimcall wants to merge 4 commits intojaredhocutt:masterfrom
johnsimcall wants to merge 4 commits intojaredhocutt:masterfrom
Conversation
This resolves issues jaredhocutt#4 (keypair_path), jaredhocutt#7 (route53_hosted_zone), and jaredhocutt#55 (rhcos_ami) Edit: Commit amended to include the removal of TODO comments from aws_create.yml
jaredhocutt
suggested changes
Aug 28, 2020
| vpc_cidr: 172.31.0.0/16 | ||
| vpc_subnet_bits: 24 | ||
| route53_hosted_zone_name: "{{ cluster_domain }}" | ||
| route53_hosted_zone_name: "{{ cluster_domain }}" #TODO: Does this need to have a trailing period? |
| ec2_instance_type_worker: m5.large | ||
|
|
||
| root_volume_size_bastion: 100 # +80GB to mirror the OLM images | ||
| root_volume_size_bastion: 20 # 20GB base + 100GB to mirror OperatorHub |
Owner
There was a problem hiding this comment.
Did you mean for this to be 120 instead of 20?
Comment on lines
+9
to
+20
| - name: Fail when subnet_ids are undefined | ||
| fail: | ||
| msg: | | ||
| ERROR: When vpc_id is provided a list of public and private subnet_ids | ||
| must also be provided. For example: | ||
| public_subnet_ids: | ||
| - subnet-0123456789abcdef0 | ||
| private_subnet_ids: | ||
| - subnet-1234567890abcdef1 | ||
| - subnet-234567890abcdef12 | ||
| - subnet-34567890abcdef123 | ||
| when: (public_subnet_ids is undefined) or (private_subnet_ids is undefined) |
Owner
There was a problem hiding this comment.
We'll need a bit more complex check because for a disconnected environment, there will not be any public_subnet_ids. Since we don't have the full logic for disconnected yet, this is fine to leave as is. Just commenting so we have a reminder for the future.
Comment on lines
+90
to
+109
| - block: | ||
| - name: Create NAT gateways | ||
| ec2_vpc_nat_gateway: | ||
| subnet_id: "{{ item }}" | ||
| if_exist_do_not_create: yes | ||
| loop: "{{ public_subnet_ids }}" | ||
| register: r_create_nat_gateways | ||
|
|
||
| # The ec2_vpc_nat_gateway doesn't allow you to add tags during creation, so | ||
| # let's tag things after the fact (even if not all of the NGWs were created) | ||
| always: | ||
| - name: Add NAT gateway tags | ||
| ec2_tag: | ||
| resource: "{{ item.0.nat_gateway_id }}" | ||
| tags: | ||
| Name: "{{ cluster_id }}-{{ item.1 }}" | ||
| OpenShiftCluster: "{{ cluster_domain }}" | ||
| OpenShiftClusterId: "{{ cluster_id }}" | ||
| loop: "{{ r_create_nat_gateways.results | zip(availability_zone_names) | list }}" | ||
| when: item.0.success |
Owner
There was a problem hiding this comment.
This is pretty clever. I like it!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR resolves pre-run verification issues #4 #7 #55 and bug #56
@jaredhocutt would you please take a look at this when you get back from PTO?