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