2023-09-02 09:42:37 +02:00
|
|
|
- name: create administrator
|
|
|
|
user:
|
|
|
|
name: administrator
|
|
|
|
update_password: on_create
|
|
|
|
password: "{{ user_administrator_initial_password | password_hash('sha512') }}"
|
|
|
|
create_home: yes
|
|
|
|
generate_ssh_key: yes
|
|
|
|
ssh_key_type: rsa
|
|
|
|
ssh_key_bits: 8192
|
|
|
|
|
|
|
|
- name: "create {{path_administrator_scripts}}"
|
|
|
|
file:
|
|
|
|
path: "{{path_administrator_home}}scripts"
|
|
|
|
state: directory
|
|
|
|
owner: administrator
|
|
|
|
group: administrator
|
|
|
|
mode: 0700
|
|
|
|
|
2023-04-26 14:38:02 +02:00
|
|
|
- name: create {{path_administrator_home}}.ssh/authorized_keys
|
2020-12-25 15:38:42 +01:00
|
|
|
copy:
|
2023-04-26 14:38:02 +02:00
|
|
|
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}{{path_administrator_home}}.ssh/authorized_keys"
|
|
|
|
dest: "{{path_administrator_home}}.ssh/authorized_keys"
|
2020-12-25 15:38:42 +01:00
|
|
|
owner: administrator
|
|
|
|
group: administrator
|
|
|
|
mode: '0644'
|
|
|
|
|
2020-12-31 17:01:47 +01:00
|
|
|
- name: grant administrator sudo rights with password
|
2020-12-25 15:38:42 +01:00
|
|
|
copy:
|
2021-01-01 12:51:40 +01:00
|
|
|
src: "administrator"
|
|
|
|
dest: /etc/sudoers.d/administrator
|
|
|
|
mode: '0644'
|
|
|
|
owner: root
|
|
|
|
group: root
|
2021-01-10 19:37:44 +01:00
|
|
|
notify: sshd restart
|
2021-10-18 18:46:58 +02:00
|
|
|
|
2023-04-26 14:38:02 +02:00
|
|
|
- name: "create {{path_administrator_home}}volumes/"
|
2021-10-18 18:46:58 +02:00
|
|
|
file:
|
2023-04-26 14:38:02 +02:00
|
|
|
path: "{{path_administrator_home}}volumes"
|
2021-10-18 18:46:58 +02:00
|
|
|
state: directory
|
|
|
|
owner: administrator
|
|
|
|
group: administrator
|
|
|
|
mode: 0700
|