2021-02-09 23:28:01 +00:00
|
|
|
- name: Import secret.yaml to obtain secrets
|
|
|
|
include_tasks: secrets.yaml
|
|
|
|
when:
|
|
|
|
- mastodon_use_external_db
|
|
|
|
- postgres_enabled is defined and postgres_enabled
|
|
|
|
|
|
|
|
- set_fact:
|
2024-05-25 15:12:30 +00:00
|
|
|
mastodon_combined_values: "{{ mastodon_default_values | combine(mastodon_values | default({}), recursive=true) }}"
|
2021-02-09 23:28:01 +00:00
|
|
|
|
|
|
|
- name: Deploy Mastodon
|
2022-07-12 13:48:14 +00:00
|
|
|
kubernetes.core.helm:
|
2021-02-09 23:28:01 +00:00
|
|
|
create_namespace: true
|
|
|
|
release_namespace: "{{ mastodon_namespace | default(namespace) }}"
|
|
|
|
release_name: "{{ mastodon_name | default('mastodon') }}"
|
2023-06-10 03:20:10 +00:00
|
|
|
chart_ref: "{{ mastodon_chart_ref }}"
|
2021-02-09 23:28:01 +00:00
|
|
|
chart_version: "{{ mastodon_version | default(omit) }}"
|
|
|
|
release_values: "{{ mastodon_combined_values | from_yaml }}"
|
2023-04-08 19:26:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
- name: Search for mastodon web pod
|
|
|
|
kubernetes.core.k8s_info:
|
|
|
|
kind: Pod
|
|
|
|
namespace: "{{ mastodon_namespace | default(namespace) }}"
|
|
|
|
label_selectors:
|
|
|
|
- app.kubernetes.io/component=web
|
|
|
|
- app.kubernetes.io/instance=mastodon
|
|
|
|
register: mastodon_web_pod_name
|
|
|
|
|
|
|
|
- name: Remove mastodon web pod for restart
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
state: absent
|
|
|
|
api_version: v1
|
|
|
|
kind: Pod
|
|
|
|
namespace: "{{ mastodon_namespace | default(namespace) }}"
|
|
|
|
name: "{{ mastodon_web_pod_name.resources[0].metadata.name }}"
|
|
|
|
|
|
|
|
- name: Search for mastodon streaming pod
|
|
|
|
kubernetes.core.k8s_info:
|
|
|
|
kind: Pod
|
|
|
|
namespace: "{{ mastodon_namespace | default(namespace) }}"
|
|
|
|
label_selectors:
|
|
|
|
- app.kubernetes.io/component=streaming
|
|
|
|
- app.kubernetes.io/instance=mastodon
|
|
|
|
register: mastodon_streaming_pod_name
|
|
|
|
|
|
|
|
- name: Remove mastodon streaming pod for restart
|
|
|
|
kubernetes.core.k8s:
|
|
|
|
state: absent
|
|
|
|
api_version: v1
|
|
|
|
kind: Pod
|
|
|
|
namespace: "{{ mastodon_namespace | default(namespace) }}"
|
|
|
|
name: "{{ mastodon_streaming_pod_name.resources[0].metadata.name }}"
|