2023-07-30 00:19:36 +00:00
# Ansible Role: strfry
2023-08-11 19:28:48 +00:00
This Ansible Role builds and installs [strfry ](https://github.com/hoytech/strfry ), and also sets up [strfry-policies ](https://gitlab.com/soapbox-pub/strfry-policies ). It is intended to be composed with a separate role to handle the web proxy configuration.
2023-07-30 00:19:36 +00:00
2023-08-03 15:49:38 +00:00
Tested on:
* Archlinux
* Debian 11
* Ubuntu 22.04
2023-07-30 00:19:36 +00:00
## Requirements
None.
## Role Variables
```yaml
strfry_version: beta # git repository branch or release tag
strfry_make_jobs: "{{ ansible_processor_cores }}" # number of CPUs to build with
2023-07-30 00:33:15 +00:00
strfry_skip_config: no
2023-08-11 19:28:48 +00:00
strfry_policies_enabled: yes
2023-07-30 00:19:36 +00:00
```
2023-07-30 00:33:15 +00:00
See the role [defaults ](defaults/main.yml ).
If you are not using the `beta` branch/version, you should override the template with your own by enabling `strfry_skip_config` and managing the configuration manually.
2023-07-30 00:19:36 +00:00
2023-07-30 00:33:15 +00:00
```yaml
strfry_skip_config: yes
```
2023-07-30 00:19:36 +00:00
For more configuration info, see the relevant upstream [configuration example ](https://github.com/hoytech/strfry/blob/beta/strfry.conf ) for your branch/version.
## Example Playbook
```yaml
2023-07-30 00:33:15 +00:00
- hosts: strfry
become: yes
2023-07-30 00:19:36 +00:00
roles:
- role: bleetube.strfry
- role: nginxinc.nginx_core.nginx
tasks:
- import_tasks: nginx_conf.yml
```
2023-07-30 00:33:15 +00:00
A sample [nginx configuration ](docs/examples/nginx_conf.yml ) is provided.
2023-07-30 00:19:36 +00:00
2023-07-30 00:33:15 +00:00
For a fully functional production example that includes hosting multiple relays, see this [homelab stack ](https://github.com/bleetube/satstack ).
## Troubleshooting
If `make` fails, try building on a single core:
2023-07-30 00:19:36 +00:00
```shell
ansible-playbook playbooks/strfry/main.yml -e 'strfry_make_jobs=1'
```
2023-07-30 00:33:15 +00:00
Logs
```shell
systemctl status strfry
journalctl -fu strfry
```
2023-07-31 03:28:53 +00:00
## Resources
Plugins:
* [strfry policies ](https://gitlab.com/soapbox-pub/strfry-policies ) plugin (deno) - recommended
* [strfry metrics ](https://github.com/bleetube/strfry-plugin ) (python)
* [spamblaster ](https://github.com/relaytools/spamblaster ) (go)