diff --git a/ansible/configs/odf-dr-binder/post_software.yml b/ansible/configs/odf-dr-binder/post_software.yml index 4c02e2a51b5..c830a38beb4 100644 --- a/ansible/configs/odf-dr-binder/post_software.yml +++ b/ansible/configs/odf-dr-binder/post_software.yml @@ -12,33 +12,52 @@ msg: - Entering the odf-dr-binder post_software +##################################### +# Testing ssh keys +##################################### + - name: Store aws_hub_a private key + copy: + content: "{{ aws_hub_a_provision_data.ssh_provision_key }}\n" + dest: "{{ output_dir }}/aws_hub_a.pem" + mode: 0400 + + - name: Store aws_primary_a private key + copy: + content: "{{ aws_primary_a_provision_data.ssh_provision_key}}\n" + dest: "{{ output_dir }}/aws_primary_a.pem" + mode: 0400 + + - name: Store aws_secondry_a private key + copy: + content: "{{ aws_secondary_a_provision_data.ssh_provision_key }}\n" + dest: "{{ output_dir }}/aws_prod_cluster.pem" + mode: 0400 + + # In-Memory inventory - name: add aws-hub to inventory ansible.builtin.add_host: name: "{{ aws_hub_a_provision_data.bastion_public_hostname }}" groups: ohc_hub ansible_connection: ssh - ansible_ssh_private_key_file: "~/.ssh/opentlc_admin_backdoor.pem" + ansible_ssh_private_key_file: "{{ output_dir }}/aws_hub_a.pem" ansible_user: "ec2-user" - remote_user: "ec2-user" - name: add aws-primary to inventory ansible.builtin.add_host: name: "{{ aws_primary_a_provision_data.bastion_public_hostname }}" groups: ohc_aws_primary_a ansible_connection: ssh - ansible_ssh_private_key_file: "~/.ssh/opentlc_admin_backdoor.pem" + ansible_ssh_private_key_file: "{{ output_dir }}/aws_primary_a.pem" ansible_user: "ec2-user" - remote_user: "ec2-user" - name: add aws-secondary to inventory ansible.builtin.add_host: name: "{{ aws_secondary_a_provision_data.bastion_public_hostname }}" groups: ohc_aws_secondary_a ansible_connection: ssh - ansible_ssh_private_key_file: "~/.ssh/opentlc_admin_backdoor.pem" + ansible_ssh_private_key_file: "{{ output_dir }}/aws_prod_cluster.pem" ansible_user: "ec2-user" - remote_user: "ec2-user" # Loggin into Cluster's bastion - name: Logging into Hub