diff --git a/matrix.yml b/matrix.yml index 57d0cee..20d426a 100644 --- a/matrix.yml +++ b/matrix.yml @@ -94,6 +94,40 @@ state: present gid: 1007 + - name: Hide matrix user from login screen + blockinfile: + path: /var/lib/AccountsService/users/matrix + mode: "0444" + owner: root + group: root + create: yes + block: | + [User] + SystemAccount=true + backup: no + + - name: Create matrix User + ansible.builtin.user: + name: matrix + comment: matrix User + uid: 1007 + group: matrix + + - name: Create ssh dir + ansible.builtin.file: + path: /home/matrix/.ssh + owner: matrix + group: matrix + state: directory + mode: '0700' + + - name: Generate an OpenSSH keypair ed25519 + community.crypto.openssh_keypair: + owner: matrix + group: matrix + path: /home/matrix/.ssh/id_ed25519 + type: ed25519 + - name: /home/docker/matrix.{{inventory_hostname}}/genpw.sh (generate Random PW for Matrix and DB) blockinfile: path: /home/docker/matrix.{{inventory_hostname}}/genpw.sh