Initial commit

This commit is contained in:
2026-07-22 01:23:40 -04:00
commit de9b3c0c1e
8 changed files with 348 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
+3
View File
@@ -0,0 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# defaults file for ansible-role-peertube
+3
View File
@@ -0,0 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for ansible-role-peertube
+35
View File
@@ -0,0 +1,35 @@
#SPDX-License-Identifier: MIT-0
galaxy_info:
author: your name
description: your role description
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Choose a valid license ID from https://spdx.org - some suggested licenses:
# - BSD-3-Clause (default)
# - MIT
# - GPL-2.0-or-later
# - GPL-3.0-only
# - Apache-2.0
# - CC-BY-4.0
license: license (GPL-2.0-or-later, MIT, etc)
min_ansible_version: 2.1
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
+257
View File
@@ -0,0 +1,257 @@
#SPDX-License-Identifier: MIT-0
---
# tasks file for ansible-role-peertube
- name: add peertube repo
kubernetes.core.helm_repository:
name: peertube
repo_url: https://dl.peertube.com/charts/
register: repo_update
- name: update repos
command: helm repo update
when: repo_update.changed
- name: deploy peertube
kubernetes.core.helm:
name: peertube
chart_ref: peertube/peertube
release_namespace: peertube
create_namespace: true
values:
image:
repository: chocobozzz/peertube
pullPolicy: IfNotPresent
config:
serverName: peertube.eom.dev
webadminConfig: true
secret: "{{ peertube_secret }}"
admin:
email: eric@eom.dev
mail:
transport: smtp
# sendmail:
hostname: postfix.eom.dev
port: 587
username: peertube
fromAddress: peertube@eom.dev
password: "{{ peertube_admin_password }}"
## Data storage on S3 - will still require persistence even if enabled.
objectStorage:
enabled: true
endpoint: minio.eom.dev
region: us-east-1
# uploadACL: public-read
# uploadACLPrivate: private
# maxUploadPart: 2GB
accessKey: "{{ peertube_minio_access_key }}""
secretKey: "{{ peertube_minio_secret_key }}"
streaming:
bucket_name: peertube
prefix: streaming/
# base_url:
videos:
bucket_name: peertube
prefix: videos/
# base_url:
exports:
bucket_name: peertube
prefix: exports/
# base_url:
originals:
bucket_name: peertube
prefix: originals/
# base_url:
captions:
bucket_name: peertube
prefix: captions/
# base_url:
## Main persistent storage, will be used for uploads, processing, plugins, etc
persistence:
enabled: true
size: 2Ti
storageClass: "nfs-client"
extraConfig:
## It's recommended to limit this to only your internal cluster network
trust_proxy:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/24
- fc00::/7
# - loopback
instance:
description: "PeerTube on eom.dev"
## Extra environment variables to set on Peertube
##
extraEnv:
- name: PT_INITIAL_ROOT_PASSWORD
value: "{{ peertube_admin_password }}"
# - name: TZ
# value: Europe/Stockholm
extraSecret: {}
# PEERTUBE_INSTANCE_TERMS: "These are some very secret terms-of-service"
## Extra values to set on the pod spec.
## Can be used for setting things like host aliases, overhead, custom schedulers, etc
##
extraPodSpec: {}
# Additional volumes of the peertube pod.
extraVolumes: []
# - name: my-config
# configMap:
# name: my-config
# Additional volume mounts of the peertube container.
extraVolumeMounts: []
# - name: my-config
# mountPath: /my-path/
# subPath: my-file
## Self-deployed PostgreSQL database
## See: https://github.com/bitnami/charts/tree/master/bitnami/postgresql
##
postgresql:
enabled: true
auth:
database: peertube
username: peertube
# existingSecret:
# secretKeys:
# userPasswordKey: password
persistence:
enabled: true
## Externally managed PostgreSQL, required if postgresql.enabled=false
##
externalPostgresql:
host:
# port: 5432
database: peertube
username: peertube
# password:
# ssl: true
# existingSecret:
# existingSecretKey: postgres-password
## Self-deployed Redis database
## See: https://github.com/bitnami/charts/tree/master/bitnami/redis
##
redis:
enabled: true
architecture: standalone
auth:
enabled: true
# password: peertube
# existingSecret: redis-secret
# existingSecretPasswordKey: redis-password
master:
kind: Deployment
persistence:
enabled: true
## Externally managed Redis, required if redis.enabled=false
##
externalRedis:
host:
# port: 6379
# db: 0
# password:
# existingSecret:
# existingSecretKey: redis-password
## Default probes, using ping API to avoid excessive echo
##
livenessProbe:
httpGet:
path: /api/v1/ping
port: http
readinessProbe:
httpGet:
path: /api/v1/ping
port: http
startupProbe:
httpGet:
path: /api/v1/ping
port: http
serviceAccount:
## Specifies whether a service account should be created
create: true
## Annotations to add to the service account
annotations: {}
## The name of the service account to use.
## If not set and create is true, a name is generated using the fullname template
# name:
podAnnotations: {}
podSecurityContext:
fsGroup: 999
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 999
# capabilities:
# drop:
# - ALL
service:
type: ClusterIP
port: 80
rtmpPort: 1935
ingress:
enabled: true
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
paths:
- path: /
pathType: ImplementationSpecific
tls: []
- secretName: peertube-tls
hosts:
- peertube.eom.dev
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
+3
View File
@@ -0,0 +1,3 @@
#SPDX-License-Identifier: MIT-0
localhost
+6
View File
@@ -0,0 +1,6 @@
#SPDX-License-Identifier: MIT-0
---
- hosts: localhost
remote_user: root
roles:
- ansible-role-peertube
+3
View File
@@ -0,0 +1,3 @@
#SPDX-License-Identifier: MIT-0
---
# vars file for ansible-role-peertube