nginx_logsync: Rename logsync user to weblog
This commit is contained in:
parent
61eade7662
commit
de5a72dc8d
1 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue