From 1b5d5bfeeb36e8de6a0b9b19b80a01d386afef1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Fri, 24 Mar 2023 15:35:53 +0100 Subject: [PATCH] Add GotoSocial --- docs/services/gotosocial.md | 24 +++++++++++------------- group_vars/mash_servers | 8 +++++++- requirements.yml | 4 ++++ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/services/gotosocial.md b/docs/services/gotosocial.md index f149942..195c81c 100644 --- a/docs/services/gotosocial.md +++ b/docs/services/gotosocial.md @@ -23,20 +23,18 @@ gotosocial_hostname: 'social.example.org' ######################################################################## ``` -After installation, you can use `just run-tags firezone-create-or-reset-admin` any time to: -- create the configured admin account -- or, reset the password to the current password configured in `vars.yml` - -### Networking - -By default, the following ports will be exposed by the container on **all network interfaces**: - -- `51820` over **UDP**, controlled by `firezone_wireguard_bind_port` - used for [Wireguard](https://en.wikipedia.org/wiki/WireGuard) connections - -Docker automatically opens these ports in the server's firewall, so you **likely don't need to do anything**. If you use another firewall in front of the server, you may need to adjust it. +After installation, you can use `ansible-playbook -i inventory/hosts setup.yml --tags=gotosocial-add-user --extra-vars "username= email= password="` +to create your a user. Change `--tags=gotosocial-add-user` to `--tags=gotosocial-add-admin` to create an admin account. ### Usage -After [installing](../installing.md), you can login at the URL specified in `firezone_hostname`, with the credentials set in `firezone_default_admin_email` and `firezone_default_admin_password`. +After [installing](../installing.md), you can visti at the URL specified in `firezone_hostname` and should see your instance. +Start to customize it at `social.example.org/admin`. -Refer to the [official documentation](https://www.firezone.dev/docs/user-guides/add-devices/) to figure out how to add devices, etc. +Use the [GtS CLI Tool](https://docs.gotosocial.org/en/latest/admin/cli/) to do admin & maintenance tasks. E.g. use +```bash +docker exec -it mash-gotosocial /gotosocial/gotosocial admin account demote --username +``` +to demote a user from admin to normal user. + +Refer to the [great official documentation](https://docs.gotosocial.org/en/latest/) for more information on GoToSocial. diff --git a/group_vars/mash_servers b/group_vars/mash_servers index 9e1c469..41af26a 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -174,6 +174,12 @@ devture_postgres_managed_databases_auto: | 'password': devture_woodpecker_ci_server_database_datasource_password, }] if devture_woodpecker_ci_server_enabled else []) + + ([{ + 'name': gotosocial_database_name, + 'username': gotosocial_database_username, + 'password': gotosocial_database_password, + }] if gotosocial_enabled else []) + + ([{ 'name': miniflux_database_name, 'username': miniflux_database_username, @@ -1369,7 +1375,7 @@ gotosocial_database_host: "{{ devture_postgres_identifier if devture_postgres_en gotosocial_database_port: "{{ '5432' if devture_postgres_enabled else '' }}" gotosocial_database_name: "{{ gotosocial_identifier }}" gotosocial_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.gotosocial', rounds=655555) | to_uuid }}" -gotosocial_database_user: "{{ gotosocial_identifier }}" +gotosocial_database_username: "{{ gotosocial_identifier }}" gotosocial_systemd_required_services_list: | {{ diff --git a/requirements.yml b/requirements.yml index 5666498..214219a 100644 --- a/requirements.yml +++ b/requirements.yml @@ -130,3 +130,7 @@ - src: git+https://github.com/moan0s/role-firezone.git name: firezone version: 260f0049ea07e1a39df7cf118b267c15477f70be + +- src: git+https://github.com/moan0s/role-gotosocial.git + name: gotosocial + version: 837b94371e6d8629a8c5a659c6362fc678f775ef