2024-11-14 17:02:19 +01:00
|
|
|
- hosts: "{{ hosts }}"
|
|
|
|
tasks:
|
|
|
|
# Deploy SSH Key
|
|
|
|
# --
|
|
|
|
- name: Create a directory if it does not exist
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: ~/.ssh/id_rsa
|
|
|
|
state: directory
|
|
|
|
mode: '0700'
|
|
|
|
- name: Download id_rsa
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: http://192.168.77.106:48000/ssh/id_rsa
|
2024-11-14 17:20:27 +01:00
|
|
|
dest: /home/jd/.ssh/id_rsa
|
2024-11-14 17:02:19 +01:00
|
|
|
mode: '0600'
|
|
|
|
- name: Download id_rsa.pub
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: http://192.168.77.106:48000/ssh/id_rsa.pub
|
2024-11-14 17:20:27 +01:00
|
|
|
dest: /home/jd/.ssh/id_rsa.pub
|
2024-11-14 17:02:19 +01:00
|
|
|
mode: '0600'
|