From de5a72dc8d490e7b70ba2a0b198578ec82972d8d Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Fri, 16 May 2025 16:45:11 +0000 Subject: [PATCH] nginx_logsync: Rename logsync user to weblog --- roles/nginx_logsync/tasks/main.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/nginx_logsync/tasks/main.yml b/roles/nginx_logsync/tasks/main.yml index 0d7c9ff..9ae7565 100644 --- a/roles/nginx_logsync/tasks/main.yml +++ b/roles/nginx_logsync/tasks/main.yml @@ -1,34 +1,34 @@ --- - name: Create group ansible.builtin.group: - name: logsync + name: weblog system: true - name: Create user ansible.builtin.user: - name: logsync - comment: Service logsync + name: weblog + comment: Service weblog create_home: false - group: logsync + group: weblog home: /var/empty shell: /sbin/nologin - name: Create authorized_keys ansible.builtin.copy: - dest: /etc/ssh/authorized_keys.logsync - src: ../files/ssh/logsync.pub + dest: /etc/ssh/authorized_keys.weblog + src: ../files/ssh/weblog.pub mode: "0640" owner: root - group: logsync + group: weblog - name: Configure sshd chroot ansible.builtin.blockinfile: path: /etc/ssh/sshd_config block: | - Match User logsync + Match User weblog ChrootDirectory /var/www/logs ForceCommand internal-sftp - AuthorizedKeysFile /etc/ssh/authorized_keys.logsync - marker: "# {mark} ANSIBLE MANAGED BLOCK (user logsync)" + AuthorizedKeysFile /etc/ssh/authorized_keys.weblog + marker: "# {mark} ANSIBLE MANAGED BLOCK (user weblog)" validate: "sshd -t -f %s" notify: Restart sshd