aboutsummaryrefslogtreecommitdiffstats
path: root/roles/hastebin
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-13 20:05:25 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-13 20:05:52 -0500
commit8c2dccad6652a535a6c549a2c4133afd9eb251ed (patch)
tree6760ba328fe606693601f9c1c51bfd7b010a974b /roles/hastebin
parent3e94667b6b73c588ea8503138b5e201b45686978 (diff)
downloadselfhosted-8c2dccad6652a535a6c549a2c4133afd9eb251ed.tar.gz
selfhosted-8c2dccad6652a535a6c549a2c4133afd9eb251ed.zip
add docs
Diffstat (limited to 'roles/hastebin')
-rw-r--r--roles/hastebin/README.md52
-rw-r--r--roles/hastebin/defaults/main.yml5
-rw-r--r--roles/hastebin/vars/main.yml1
3 files changed, 53 insertions, 5 deletions
diff --git a/roles/hastebin/README.md b/roles/hastebin/README.md
new file mode 100644
index 0000000..7351679
--- /dev/null
+++ b/roles/hastebin/README.md
@@ -0,0 +1,52 @@
+Hastebin
+========
+
+Description
+-----------
+
+The `hastebin` role installs and configures [Hastebin](https://github.com/toptal/haste-server),
+an open source pastebin.
+
+This role configures the NodeJS application only; it does not configure a reverse
+proxy.
+
+
+Variables
+---------
+
+This role **accepts** the following variables:
+
+Variable | Default | Description
+--------------------------|----------|------------
+`hastebin_version` | `master` | Git version to install
+`hastebin_upload_cidrs` | `[]` | List of CIDRS from which to allow new pastes
+`hastebin_port` | 8080 | Local listening port
+`hastebin_expire_days` | 0 | Paste expiration time (days, 0 to disable)
+
+This role **exports** the following variables:
+
+Variable | Description
+-------------------------|------------
+`hastebin_apache_config` | Apache config block to configure a reverse proxy
+`hastebin_archive_shell` | Shell command to create tarball of hastebin data
+
+Usage
+-----
+
+Example playbook:
+
+````yaml
+- hosts: hastebin_servers
+ roles:
+ - role: hastebin
+ hastebin_port: 8080
+ hastebin_upload_cidrs:
+ - 10.10.10.0/24
+ hastebin_expire_days: 30
+
+ - role: apache_vhost
+ apache_server_name: hastebin.example.com
+ apache_server_aliases: []
+ apache_letsencrypt: yes
+ apache_config: '{{ hastebin_apache_config }}'
+````
diff --git a/roles/hastebin/defaults/main.yml b/roles/hastebin/defaults/main.yml
index adbe279..56f2303 100644
--- a/roles/hastebin/defaults/main.yml
+++ b/roles/hastebin/defaults/main.yml
@@ -1,9 +1,4 @@
hastebin_version: master
-hastebin_server_aliases: []
-hastebin_letsencrypt: no
hastebin_upload_cidrs: []
hastebin_port: 8080
-
hastebin_expire_days: 0
-
-hastebin_user: hastebin
diff --git a/roles/hastebin/vars/main.yml b/roles/hastebin/vars/main.yml
index cfb474b..c931a87 100644
--- a/roles/hastebin/vars/main.yml
+++ b/roles/hastebin/vars/main.yml
@@ -2,6 +2,7 @@ hastebin_packages:
- git
- nodejs
+hastebin_user: hastebin
hastebin_home: /var/lib/hastebin
hastebin_install_dir: '{{ hastebin_home }}/haste-server'
hastebin_data_dir: '{{ hastebin_home }}/data'