mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
sudo rights for administrator without password and copying of authorized keyes
This commit is contained in:
@@ -4,4 +4,17 @@
|
||||
generate_ssh_key: yes
|
||||
ssh_key_bits: 4096
|
||||
ssh_key_file: .ssh/id_rsa
|
||||
group: sudo
|
||||
group: administrator
|
||||
|
||||
- name: create /home/administrator/.ssh/authorized_keys
|
||||
copy:
|
||||
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/home/administrator/.ssh/authorized_keys"
|
||||
dest: /home/administrator/.ssh/authorized_keys
|
||||
owner: administrator
|
||||
group: administrator
|
||||
mode: '0644'
|
||||
|
||||
- name: grant administrator sudo rights without password
|
||||
copy:
|
||||
content: '%administrator ALL=(ALL) NOPASSWD: ALL'
|
||||
dest: /etc/sudoers.d/administrator
|
||||
|
Reference in New Issue
Block a user