*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 8af7b37d authored by Weber, Thomas's avatar Weber, Thomas
Browse files

use dedicated ssh key directory

parent 43464d96
No related branches found
No related tags found
1 merge request!1Restore main as the default branch
......@@ -17,3 +17,5 @@ agent_count: 3
loadbalancer_name: "rke2_{{ cluster_name }}"
security_group: "rke2_{{ cluster_name }}"
state: present
ssh_keys_dir: ssh_keys
\ No newline at end of file
......@@ -9,9 +9,15 @@
# - debug:
# var: ssh_key
- name: create inventory folders
file:
path: "{{ ssh_keys_dir }}"
state: directory
- name: store private key locally
copy:
dest: "{{ inventory_dir }}/{{ ssh_key_name }}.pem"
dest: "{{ ssh_keys_dir }}/{{ ssh_key_name }}.pem"
content: "{{ ssh_key.key.private_key }}"
mode: "0600"
when: state == 'present' and ssh_key.key.private_key != none
\ No newline at end of file
......@@ -4,4 +4,4 @@ master_floating_ip: {{ new_master_floating_ip }}
subnet_id: {{ new_subnet_id }}
ssh_key_file: {{ ssh_key_file }}
\ No newline at end of file
ssh_key_file: {{ ssh_keys_dir }}/{{ ssh_key_file }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment