fixed the key and got it woking

This commit is contained in:
Justin 2025-01-23 01:09:23 +00:00
parent 928d498706
commit eb13ba8fcd
1 changed files with 2 additions and 2 deletions

View File

@ -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: