mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 11:47:14 +02:00
Refactored peertube role and implemented config volume
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
- run_once_web_svc_collabora is not defined
|
- run_once_web_svc_collabora is not defined
|
||||||
- NEXTCLOUD_COLLABORA_ENABLED | bool
|
- NEXTCLOUD_COLLABORA_ENABLED | bool
|
||||||
|
|
||||||
|
|
||||||
- name: "include role for {{ application_id }} to receive certs & do modification routines"
|
- name: "include role for {{ application_id }} to receive certs & do modification routines"
|
||||||
include_role:
|
include_role:
|
||||||
name: sys-util-csp-cert
|
name: sys-util-csp-cert
|
||||||
|
@@ -40,3 +40,4 @@ docker:
|
|||||||
no_stop_required: true
|
no_stop_required: true
|
||||||
volumes:
|
volumes:
|
||||||
data: peertube_data
|
data: peertube_data
|
||||||
|
config: peertube_config
|
@@ -4,15 +4,15 @@
|
|||||||
|
|
||||||
- name: Check if OIDC plugin is already installed
|
- name: Check if OIDC plugin is already installed
|
||||||
command: >
|
command: >
|
||||||
docker exec {{ peertube_name }} test -d /data/plugins/data/peertube-plugin-auth-openid-connect
|
docker exec {{ PEERTUBE_CONTAINER }} test -d /data/plugins/data/peertube-plugin-auth-openid-connect
|
||||||
register: peertube_oidc_plugin_check
|
register: peertube_oidc_plugin_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: "Install auth-openid-connect plugin for Peertube"
|
- name: "Install auth-openid-connect plugin for Peertube"
|
||||||
command: >
|
command: >
|
||||||
docker exec {{ peertube_name }} \
|
docker exec {{ PEERTUBE_CONTAINER }} \
|
||||||
npm run plugin:install -- --npm-name {{oidc_plugin}}
|
npm run plugin:install -- --npm-name {{ PEERTUBE_OIDC_PLUGIN }}
|
||||||
when: peertube_oidc_plugin_check.rc != 0
|
when: peertube_oidc_plugin_check.rc != 0
|
||||||
notify: docker compose up
|
notify: docker compose up
|
||||||
|
|
5
roles/web-app-peertube/tasks/02_disable-oidc.yml
Normal file
5
roles/web-app-peertube/tasks/02_disable-oidc.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- name: "Uninstall auth-openid-connect plugin for Peertube"
|
||||||
|
command: >
|
||||||
|
docker exec {{ PEERTUBE_CONTAINER }} \
|
||||||
|
npm run plugin:uninstall -- --npm-name {{ PEERTUBE_OIDC_PLUGIN }}
|
||||||
|
ignore_errors: true
|
@@ -1,5 +0,0 @@
|
|||||||
- name: "Uninstall auth-openid-connect plugin for Peertube"
|
|
||||||
command: >
|
|
||||||
docker exec {{ peertube_name }} \
|
|
||||||
npm run plugin:uninstall -- --npm-name {{oidc_plugin}}
|
|
||||||
ignore_errors: true
|
|
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: "include create-domains.yml for peertube"
|
- name: "include _create-domains.yml for peertube"
|
||||||
include_tasks: create-domains.yml
|
include_tasks: _create-domains.yml
|
||||||
loop: "{{ domains['web-app-peertube'] }}"
|
loop: "{{ domains[application_id] }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: domain
|
loop_var: domain
|
||||||
vars:
|
vars:
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
name: sys-stk-back-stateful
|
name: sys-stk-back-stateful
|
||||||
|
|
||||||
- name: "Install and activate auth-openid-connect plugin if OIDC is enabled"
|
- name: "Install and activate auth-openid-connect plugin if OIDC is enabled"
|
||||||
include_tasks: enable-oidc.yml
|
include_tasks: 01_enable-oidc.yml
|
||||||
when: applications | get_app_conf(application_id, 'features.oidc', False)
|
when: PEERTUBE_OIDC_ENABLED
|
||||||
|
|
||||||
- name: "Deinstall and disable auth-openid-connect plugin if OIDC is enabled"
|
- name: "Deinstall and disable auth-openid-connect plugin if OIDC is enabled"
|
||||||
include_tasks: disable-oidc.yml
|
include_tasks: 02_disable-oidc.yml
|
||||||
when: applications | get_app_conf(application_id, 'features.oidc', False)
|
when: PEERTUBE_OIDC_ENABLED
|
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
application:
|
application:
|
||||||
{% set container_port = 9000 %}
|
{% set container_port = 9000 %}
|
||||||
image: {{ peertube_image }}:{{ peertube_version }}
|
image: {{ PEERTUBE_IMAGE }}:{{ PEERTUBE_VERSION }}
|
||||||
container_name: {{ peertube_name }}
|
container_name: {{ PEERTUBE_CONTAINER }}
|
||||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||||
ports:
|
ports:
|
||||||
- "1935:1935" # @todo Add to ports
|
- "1935:1935" # @todo Add to ports
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||||
assets:
|
assets:
|
||||||
data:
|
data:
|
||||||
name: {{ peertube_volume }}
|
name: {{ PEERTUBE_DATA_VOLUME }}
|
||||||
config:
|
config:
|
||||||
|
name: {{ PEERTUBE_CONFIG_VOLUME }}
|
||||||
|
|
||||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
@@ -6,10 +6,12 @@ database_type: "postgres"
|
|||||||
docker_compose_flush_handlers: true
|
docker_compose_flush_handlers: true
|
||||||
|
|
||||||
# Role variables
|
# Role variables
|
||||||
peertube_version: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.version', True) }}"
|
PEERTUBE_VERSION: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.version') }}"
|
||||||
peertube_image: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.image', True) }}"
|
PEERTUBE_IMAGE: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.image') }}"
|
||||||
peertube_name: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.name', True) }}"
|
PEERTUBE_CONTAINER: "{{ applications | get_app_conf(application_id, 'docker.services.peertube.name') }}"
|
||||||
peertube_volume: "{{ applications | get_app_conf(application_id, 'docker.volumes.data', True) }}"
|
PEERTUBE_DATA_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}"
|
||||||
|
PEERTUBE_CONFIG_VOLUME: "{{ applications | get_app_conf(application_id, 'docker.volumes.config') }}"
|
||||||
|
|
||||||
# OIDC
|
# OIDC
|
||||||
oidc_plugin: "peertube-plugin-auth-openid-connect"
|
PEERTUBE_OIDC_PLUGIN: "peertube-plugin-auth-openid-connect"
|
||||||
|
PEERTUBE_OIDC_ENABLED: "{{ applications | get_app_conf(application_id, 'features.oidc', False) }}"
|
Reference in New Issue
Block a user