computer-playbook/roles/server_user-administrator/tasks/main.yml

25 lines
664 B
YAML

- 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
notify: sshd restart
- name: "create /home/administrator/volumes/"
file:
path: "/home/administrator/volumes"
state: directory
owner: administrator
group: administrator
mode: 0700