diff --git a/playbooks/distrib_ssh_keys.yml b/playbooks/distrib_ssh_keys.yml index 01c3573..a0c08c6 100644 --- a/playbooks/distrib_ssh_keys.yml +++ b/playbooks/distrib_ssh_keys.yml @@ -1,10 +1,21 @@ - hosts: "{{ hosts }}" - become: yes + become: true tasks: # Deploy SSH Key # -- + - name: Download id_rsa + ansible.builtin.get_url: + url: http://192.168.77.106:48000/ssh/id_rsa + dest: ~/.ssh/id_rsa + mode: '0600' + - name: Download foo.conf + ansible.builtin.get_url: + url: http://192.168.77.106:48000/ssh/id_rsa.pub + dest: ~/.ssh/id_rsa.pub + mode: '0600' + - name: install public keys ansible.posix.authorized_key: user: "{{ user }}"