From 50bd61aba3b5170ef5a9b1562c2c897f940167e2 Mon Sep 17 00:00:00 2001 From: olli <> Date: Mon, 19 Aug 2024 09:10:26 +0200 Subject: [PATCH] matrix user --- matrix.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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