computer-playbook/roles/server_user-administrator/tasks/main.yml
2023-04-26 14:38:02 +02:00

25 lines
701 B
YAML

- name: create {{path_administrator_home}}.ssh/authorized_keys
copy:
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}{{path_administrator_home}}.ssh/authorized_keys"
dest: "{{path_administrator_home}}.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
notify: sshd restart
- name: "create {{path_administrator_home}}volumes/"
file:
path: "{{path_administrator_home}}volumes"
state: directory
owner: administrator
group: administrator
mode: 0700