mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-14 00:41:06 +01:00
22 lines
637 B
YAML
22 lines
637 B
YAML
- name: create administrator
|
|
user:
|
|
name: administrator
|
|
update_password: on_create
|
|
password: "{{ user_administrator_initial_password | password_hash('sha512') }}"
|
|
|
|
- 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 with password
|
|
copy:
|
|
src: "administrator"
|
|
dest: /etc/sudoers.d/administrator
|
|
mode: '0644'
|
|
owner: root
|
|
group: root
|