Skip to content

Commit c311c70

Browse files
authored
Merge pull request #146 from redhat-cop/patchback/backports/stable-3/1c2b0e9ffaa7eacc783dc790ec822e258fcbd28e/pr-130
[PR #130/1c2b0e9f backport][stable-3] Small updates to ec2 pattern
2 parents d9d5f91 + 4a82c38 commit c311c70

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

extensions/patterns/configure_ec2/playbooks/create_ec2_instance.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
amazon.aws.ec2_key_info:
2222
names:
2323
- "{{ key_name }}"
24-
register: key_info_result
24+
register: pattern_key_info_result
2525

2626
- name: Set manage_ec2_instance_key_name role var
2727
ansible.builtin.set_fact:
2828
manage_ec2_instance_key_name: "{{ key_name }}"
29-
when: key_info_result.keypairs | length > 0
29+
when: pattern_key_info_result.keypairs | length > 0
3030

3131
- name: Get RHEL 9 AMI ID if needed
3232
when: ami_id | default("", true) == ""
@@ -73,5 +73,5 @@
7373

7474
- name: Warn if key does not exist
7575
ansible.builtin.debug:
76-
msg: "Warning: The key '{{ key_name }}' does not exist!"
77-
when: key_name is defined and key_info_result.keypairs | length == 0
76+
msg: "Warning: The provided key '{{ key_name }}' does not exist!"
77+
when: key_name is defined and pattern_key_info_result.keypairs | length == 0

extensions/patterns/configure_ec2/template_surveys/terminate_ec2_instance.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616

1717
- type: text
1818
question_name: Key Pair Name
19-
question_description: Name of key pair for instance, include to delete key pair created with other instance resources. Defaults to '{{ instance_name }}-key'
19+
question_description: Name of key pair for instance, include to delete key pair created with other instance resources.
2020
variable: key_name
2121
required: false
2222

roles/manage_ec2_instance/tasks/ec2_instance_create_operations.yml

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
names:
2222
- "{{ manage_ec2_instance_key_name }}"
2323
register: key_info_result
24-
no_log: true
2524

2625
- name: Create new key pair
2726
amazon.aws.ec2_key:

0 commit comments

Comments
 (0)