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
|
- name: Create group
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: logsync
|
name: weblog
|
||||||
system: true
|
system: true
|
||||||
|
|
||||||
- name: Create user
|
- name: Create user
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: logsync
|
name: weblog
|
||||||
comment: Service logsync
|
comment: Service weblog
|
||||||
create_home: false
|
create_home: false
|
||||||
group: logsync
|
group: weblog
|
||||||
home: /var/empty
|
home: /var/empty
|
||||||
shell: /sbin/nologin
|
shell: /sbin/nologin
|
||||||
|
|
||||||
- name: Create authorized_keys
|
- name: Create authorized_keys
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /etc/ssh/authorized_keys.logsync
|
dest: /etc/ssh/authorized_keys.weblog
|
||||||
src: ../files/ssh/logsync.pub
|
src: ../files/ssh/weblog.pub
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
owner: root
|
owner: root
|
||||||
group: logsync
|
group: weblog
|
||||||
|
|
||||||
- name: Configure sshd chroot
|
- name: Configure sshd chroot
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.blockinfile:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
block: |
|
block: |
|
||||||
Match User logsync
|
Match User weblog
|
||||||
ChrootDirectory /var/www/logs
|
ChrootDirectory /var/www/logs
|
||||||
ForceCommand internal-sftp
|
ForceCommand internal-sftp
|
||||||
AuthorizedKeysFile /etc/ssh/authorized_keys.logsync
|
AuthorizedKeysFile /etc/ssh/authorized_keys.weblog
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK (user logsync)"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK (user weblog)"
|
||||||
validate: "sshd -t -f %s"
|
validate: "sshd -t -f %s"
|
||||||
notify: Restart sshd
|
notify: Restart sshd
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue