Skip to content

Commit 9ceb546

Browse files
committed
Add AWS SSH key check
Signed-off-by: Webster Mudge <wmudge@cloudera.com>
1 parent 94c67ca commit 9ceb546

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roles/platform/tasks/initialize_aws.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@
1717
- name: Retrieve AWS Caller details
1818
amazon.aws.aws_caller_info:
1919
register: __aws_caller_info
20-
failed_when: __aws_caller_info.account is not defined
20+
failed_when: __aws_caller_info.account is not defined
21+
22+
- name: Confirm AWS SSH Public Key ID exists
23+
ansible.builtin.command: aws ec2 describe-key-pairs --region "{{ plat__region }}" --key-name "{{ plat__public_key_id }}"
24+
register: __aws_ssh_key_pair
25+
failed_when: __aws_ssh_key_pair.rc != 0

0 commit comments

Comments
 (0)