Use sudo/become instead of root directly #158

Open
samsapti wants to merge 2 commits from use_sudo into main
Showing only changes of commit 0fd11fee37 - Show all commits

View file

@ -15,9 +15,3 @@
key: "{{ item.ssh_keys | join('\n') }}" key: "{{ item.ssh_keys | join('\n') }}"
exclusive: true exclusive: true
loop: "{{ users | default([]) }}" loop: "{{ users | default([]) }}"
- name: "Add ssh authorized_keys to root user"
ansible.posix.authorized_key:
user: "root"
key: "{{ users | default([]) | map(attribute='ssh_keys') | flatten | join('\n') }}"
exclusive: true