From 8c2dccad6652a535a6c549a2c4133afd9eb251ed Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Mon, 13 Feb 2023 20:05:25 -0500 Subject: add docs --- roles/hastebin/README.md | 52 ++++++++++++++++++++++++++++++++++++++++ roles/hastebin/defaults/main.yml | 5 ---- roles/hastebin/vars/main.yml | 1 + 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 roles/hastebin/README.md (limited to 'roles/hastebin') 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' -- cgit