aboutsummaryrefslogtreecommitdiffstats
path: root/roles/psitransfer/README.md
blob: 2f27bd25eacb996f7f917777572d9654d1c3261f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PsiTransfer
======

Description
-----------

The `psitransfer` role installs and configures [PsiTransfer](https://github.com/psi-4ward/psitransfer),
a web application for sharing files.

This role configures the NodeJS application only; it does not configure a reverse
proxy.


Variables
---------

This role **accepts** the following variables:

Variable                       | Default                           | Description
-------------------------------|-----------------------------------|------------
`psitransfer_version`          | see [defaults](defaults/main.yml) | Git version to install
`psitransfer_port`             | 8080                              | Local listening port
`psitransfer_admin_password`   |                              | Password to access `/admin` page
`psitransfer_upload_cidrs`     | `[]`                              | CIDRs allowed to upload files
`psitransfer_admin_cidrs`      | `[]`                              | CIDRs allowed to access admin page
`psitransfer_max_file_size`    | `1 GB`                            | Maximum file size
`psitransfer_max_bucket_size`  | `5 GB`                            | Maximum upload group size
`psitransfer_max_preview_size` | `32 MB`                           | Maximum size for thumbnail generation

This role **exports** the following variables:

Variable                    | Description
----------------------------|------------
`psitransfer_apache_config` | Apache config block to configure a reverse proxy


Usage
-----

Example playbook:

````yaml
- name: configure psitransfer
  hosts: filedrop_servers
  roles:
    - role: psitransfer
      psitransfer_port: 8080
      psitransfer_admin_password: s3cret
      psitransfer_upload_cidrs:
        - 10.10.10.0/24
        - 10.10.11.0/24
      psitransfer_admin_cidrs:
        - 10.10.10.0/24

    - role: apache_vhost
      apache_server_name: psitransfer.example.com
      apache_server_aliases: []
      apache_letsencrypt: yes
      apache_config: '{{ psitransfer_apache_config }}'
````