sftpuser: Remove unused role
This commit is contained in:
parent
c9e8ec6d7c
commit
de94e75549
3 changed files with 0 additions and 40 deletions
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
sftpuser_chroot: /srv/backup
|
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
dependencies:
|
|
||||||
- {role: sshd}
|
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create group
|
|
||||||
ansible.builtin.group:
|
|
||||||
name: backup
|
|
||||||
system: true
|
|
||||||
|
|
||||||
- name: Create user
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: backup
|
|
||||||
comment: Service backup
|
|
||||||
createhome: false
|
|
||||||
group: backup
|
|
||||||
home: /var/empty
|
|
||||||
shell: /sbin/nologin
|
|
||||||
system: true
|
|
||||||
|
|
||||||
- name: Create authorized_keys
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: /etc/ssh/authorized_keys.backup
|
|
||||||
src: ../files/ssh/backup.pub
|
|
||||||
mode: "0640"
|
|
||||||
owner: root
|
|
||||||
group: backup
|
|
||||||
|
|
||||||
- name: Configure sshd chroot
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
path: /etc/ssh/sshd_config
|
|
||||||
block: |
|
|
||||||
Match User backup
|
|
||||||
ChrootDirectory {{ sftpuser_chroot }}
|
|
||||||
ForceCommand internal-sftp
|
|
||||||
AuthorizedKeysFile /etc/ssh/authorized_keys.backup
|
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK (user backup)"
|
|
||||||
validate: "sshd -t -f %s"
|
|
||||||
notify: Restart sshd
|
|
Loading…
Add table
Reference in a new issue