Compare commits
3 Commits
5006ae6123
...
5e59bcc318
| Author | SHA1 | Date | |
|---|---|---|---|
|
5e59bcc318
|
|||
|
3705416a56
|
|||
|
e55f2e4708
|
@@ -14,6 +14,8 @@ build_ignore:
|
|||||||
repository: https://git.finally.coffee/finallycoffee/fediverse
|
repository: https://git.finally.coffee/finallycoffee/fediverse
|
||||||
issues: https://codeberg.org/finallycoffee/ansible-collection-fediverse/issues
|
issues: https://codeberg.org/finallycoffee/ansible-collection-fediverse/issues
|
||||||
tags:
|
tags:
|
||||||
|
- activitypub
|
||||||
|
- fediverse
|
||||||
- fediwall
|
- fediwall
|
||||||
- sharkey
|
- sharkey
|
||||||
- gotosocial
|
- gotosocial
|
||||||
|
|||||||
14
roles/gotosocial/meta/main.yml
Normal file
14
roles/gotosocial/meta/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
allow_duplicates: true
|
||||||
|
dependencies: []
|
||||||
|
galaxy_info:
|
||||||
|
role_name: gotosocial
|
||||||
|
description: >-2
|
||||||
|
Deploy GoToSocial, a lightweight, customizable and safety-focused
|
||||||
|
activitypub server written in golang.
|
||||||
|
galaxy_tags:
|
||||||
|
- gotosocial
|
||||||
|
- gts
|
||||||
|
- docker
|
||||||
|
- activitypub
|
||||||
|
- fediverse
|
||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
Set the required `sharkey_config_url` variable to the domain you want sharkey to run on.
|
||||||
|
|
||||||
|
To extend/modify the sharkey configuration file (upstream: `default.yml`),
|
||||||
|
set your (structed) configuration in `sharkey_config` and it will be merged
|
||||||
|
over the upstream config file and the role built-in configuration.
|
||||||
|
|
||||||
|
### Docker compose
|
||||||
|
|
||||||
|
To extend/modify the compose project file (`compose.yml`), populate `sharkey_compose_file_overrides`.
|
||||||
|
Take care when overriding `sharkey_compose_file_role_overrides`, as this can
|
||||||
|
break the functionality of the ansible role.
|
||||||
|
|
||||||
## Behind a proxy
|
## Behind a proxy
|
||||||
|
|
||||||
The ansible role itself will respect system proxies (in the env var `HTTP_PROXY`/`https_proxy`).
|
The ansible role itself will respect system proxies (in the env var `HTTP_PROXY`/`https_proxy`).
|
||||||
@@ -9,3 +21,24 @@ The ansible role itself will respect system proxies (in the env var `HTTP_PROXY`
|
|||||||
To use this role with a registry like Artifactory or Nexus3,
|
To use this role with a registry like Artifactory or Nexus3,
|
||||||
set `sharkey_repo_server` to your registry server with full
|
set `sharkey_repo_server` to your registry server with full
|
||||||
protocol, hostname, port. For example `sharkey_repo_server: "https://my.orgs.registry.local:8443/sharkey-internet-proxy/"`
|
protocol, hostname, port. For example `sharkey_repo_server: "https://my.orgs.registry.local:8443/sharkey-internet-proxy/"`
|
||||||
|
|
||||||
|
## Stopping
|
||||||
|
|
||||||
|
### Docker compose
|
||||||
|
|
||||||
|
Set `sharkey_compose_state: "stopped"` to ensure all containers in the compose
|
||||||
|
project are stopped. This has the same effect as `docker compose stop`. Set
|
||||||
|
`sharkey_compose_state: "absent"` to not only stop all containers, but remove
|
||||||
|
them, the docker networks associated with the project etc. This is equivalent
|
||||||
|
to `docker compose down`.
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Do not confuse `sharkey_compose_state` with `sharkey_state`!
|
||||||
|
|
||||||
|
## Deprovisioning
|
||||||
|
|
||||||
|
Set `sharkey_state: "absent"` to remove sharkey from the target, including
|
||||||
|
*all* application data, configuration files, container images.
|
||||||
|
|
||||||
|
> [!CAUTION]
|
||||||
|
> This removes all (user) data irrecoverably with no backup.
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ sharkey_repo_path: "Transfem-org/Sharkey"
|
|||||||
sharkey_repo_tag: "{{ sharkey_version }}"
|
sharkey_repo_tag: "{{ sharkey_version }}"
|
||||||
sharkey_compose_file_url: >-2
|
sharkey_compose_file_url: >-2
|
||||||
{{ sharkey_repo_server }}/{{ sharkey_repo_path }}/-/raw/{{ sharkey_version }}/compose_example.yml?ref_type=tags
|
{{ sharkey_repo_server }}/{{ sharkey_repo_path }}/-/raw/{{ sharkey_version }}/compose_example.yml?ref_type=tags
|
||||||
sharkey_compose_file_overrides:
|
sharkey_compose_file_overrides: ~
|
||||||
|
sharkey_compose_file_role_overrides:
|
||||||
services:
|
services:
|
||||||
web:
|
web:
|
||||||
image: "{{ sharkey_container_image }}"
|
image: "{{ sharkey_container_image }}"
|
||||||
@@ -34,6 +35,7 @@ sharkey_compose_file_overrides:
|
|||||||
sharkey_compose_file_contents: >-2
|
sharkey_compose_file_contents: >-2
|
||||||
{{
|
{{
|
||||||
(sharkey_compose_upstream_file_contents['content'] | b64decode | from_yaml)
|
(sharkey_compose_upstream_file_contents['content'] | b64decode | from_yaml)
|
||||||
| combine(sharkey_compose_file_overrides, recursive=True)
|
| combine(sharkey_compose_file_role_overrides, recursive=True)
|
||||||
|
| combine(sharkey_compose_file_overrides | default({}, true), recursive=True)
|
||||||
| to_nice_yaml(indent=4)
|
| to_nice_yaml(indent=4)
|
||||||
}}
|
}}
|
||||||
|
|||||||
14
roles/sharkey/meta/main.yml
Normal file
14
roles/sharkey/meta/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
allow_duplicates: true
|
||||||
|
dependencies: []
|
||||||
|
galaxy_info:
|
||||||
|
role_name: sharkey
|
||||||
|
description: >-2
|
||||||
|
Deploy Sharkey, a fork of Misskey with full Mastodon-API support
|
||||||
|
galaxy_tags:
|
||||||
|
- sharkey
|
||||||
|
- misskey
|
||||||
|
- mastodon
|
||||||
|
- docker
|
||||||
|
- activitypub
|
||||||
|
- fediverse
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
- name: Ensure final compose file is templated
|
- name: Ensure final compose file is templated
|
||||||
when: sharkey_state == 'present'
|
when: sharkey_state == 'present'
|
||||||
block:
|
block:
|
||||||
|
# TODO: wronlgy reports changed in checkmode due to hash mismatches
|
||||||
- name: Ensure compose files are downloaded
|
- name: Ensure compose files are downloaded
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ sharkey_compose_file_url }}"
|
url: "{{ sharkey_compose_file_url }}"
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
- name: Ensure sharkey config file '{{ sharkey_config_file }}' is {{ sharkey_state }}
|
- name: Ensure sharkey config file '{{ sharkey_config_file }}' is {{ sharkey_state }}
|
||||||
when: sharkey_state == 'present'
|
when: sharkey_state == 'present'
|
||||||
block:
|
block:
|
||||||
|
# TODO: wrongly reports changed in checkmode due to different hashes
|
||||||
- name: Ensure sharkey upstream config file is {{ sharkey_state }}
|
- name: Ensure sharkey upstream config file is {{ sharkey_state }}
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ sharkey_config_upstream_file_url }}"
|
url: "{{ sharkey_config_upstream_file_url }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user