fixed the key and got it woking
This commit is contained in:
parent
928d498706
commit
eb13ba8fcd
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Add ssh key
|
- name: Add ssh key
|
||||||
hosts: "killer1"
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: "{{ lookup('env', 'USER') }}"
|
user: "{{ lookup('env', 'USER') }}"
|
||||||
state: present
|
state: present
|
||||||
key: "/root/.ssh/id_rsa.pub"
|
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
||||||
|
|
||||||
- name: Change sudoers file
|
- name: Change sudoers file
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
|
|
Loading…
Reference in New Issue