collab: Add support for sftp backups
This commit is contained in:
parent
00a06a93f0
commit
aa30d05d26
1 changed files with 22 additions and 2 deletions
|
@ -122,7 +122,7 @@
|
|||
sefcontext:
|
||||
path: /export/wikis(/.*)?
|
||||
setype: httpd_sys_rw_content_t
|
||||
- name: create data directgory
|
||||
- name: create data directory
|
||||
file:
|
||||
path: /export/wikis
|
||||
mode: 0755
|
||||
|
@ -138,6 +138,14 @@
|
|||
dest: /srv/wikis
|
||||
state: link
|
||||
|
||||
- name: create collab directory
|
||||
file:
|
||||
path: /srv/wikis/collab
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: root
|
||||
group: collab
|
||||
|
||||
- name: create data directories
|
||||
file:
|
||||
state: directory
|
||||
|
@ -146,7 +154,6 @@
|
|||
owner: collab
|
||||
group: collab
|
||||
with_items:
|
||||
- "/srv/wikis/collab"
|
||||
- "/srv/wikis/collab/archive"
|
||||
- "/srv/wikis/collab/cache"
|
||||
- "/srv/wikis/collab/config"
|
||||
|
@ -242,3 +249,16 @@
|
|||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart apache
|
||||
|
||||
- import_role:
|
||||
name: sftpuser
|
||||
vars:
|
||||
chroot: /srv/wikis/collab
|
||||
user: backup
|
||||
publickeys: "{{ backup_publickeys }}"
|
||||
|
||||
- name: add backup user to collab group
|
||||
user:
|
||||
name: backup
|
||||
groups: collab
|
||||
append: true
|
||||
|
|
Loading…
Add table
Reference in a new issue