mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-23 05:01:04 +01:00
21 lines
609 B
YAML
21 lines
609 B
YAML
- name: create administrator
|
|
user:
|
|
name: administrator
|
|
generate_ssh_key: yes
|
|
ssh_key_bits: 4096
|
|
ssh_key_file: .ssh/id_rsa
|
|
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
|