Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install buster #1

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
21 changes: 12 additions & 9 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ peertube_storage:
peertube_ldap:
# url: "ldaps://ldap.com.yy:636"
# weight: "100"
# bind-dn: "cn=admin,ou=group,dc=ldap,dc=com,dc=yy"
# custom-ca: ""
# search-base: "ou=group,dc=ldap,dc=com,dc=yy"
# group-filter: !unsafe "(member={{dn}})"
# insecure-tls: false
# mail-property: "mail"
# search-filter: !unsafe "(cn={{username}})"
# bind-credentials: "xxxxx"
# username-property: "cn"
# bind_dn: "cn=admin,ou=group,dc=ldap,dc=com,dc=yy"
# custom_ca: ""
# search_base: "ou=group,dc=ldap,dc=com,dc=yy"
# group_filter: !unsafe "(member={{dn}})"
# insecure_tls: false
# mail_property: "mail"
# search_filter: !unsafe "(cn={{username}})"
# bind_credentials: "xxxxx"
# username_property: "cn"

peertube_instance:
name: 'Peertube'
Expand Down Expand Up @@ -100,3 +100,6 @@ peertube_plugins:

peertube_sql_extras:
- sentences.sql

peertube_video_quota: -1
peertube_video_quota_daily: -1
22 changes: 11 additions & 11 deletions tasks/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@
notify:
- install peertube daemon

- name: Update dependencies
become: true
become_user: peertube
shell: '{{ item }}'
loop:
- cd "{{ peertube_user_path }}/peertube-latest" && npm install
- cd "{{ peertube_user_path }}/peertube-latest/client" && npm install
- cd "{{ peertube_user_path }}/peertube-latest" && yarn install --production --pure-lockfile
- cd "{{ peertube_user_path }}/peertube-latest/client" && yarn install --pure-lockfile

- name: Enabled service Peertube
service:
name: peertube
Expand All @@ -104,7 +94,7 @@

- name: Copy script
andrespias marked this conversation as resolved.
Show resolved Hide resolved
template:
src: ../vars/{{ item }}
src: sql/{{ item }}
dest: /tmp/{{ item }}
owner: postgres
mode: 0755
Expand All @@ -116,3 +106,13 @@
command: psql -d peertube_prod -U postgres -f '/tmp/{{ item }}'
loop: "{{ peertube_sql_extras }}"
notify: restart peertube daemon

- name: Update dependencies
become: true
become_user: peertube
shell: '{{ item }}'
loop:
- cd "{{ peertube_user_path }}/peertube-latest" && npm install
- cd "{{ peertube_user_path }}/peertube-latest/client" && npm install
- cd "{{ peertube_user_path }}/peertube-latest" && yarn install --production --pure-lockfile
- cd "{{ peertube_user_path }}/peertube-latest/client" && yarn install --pure-lockfile
4 changes: 2 additions & 2 deletions templates/production.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ signup:
user:
# Default value of maximum video BYTES the user can upload (does not take into account transcoded files).
# -1 == unlimited
video_quota: -1
video_quota_daily: -1
video_quota: {{ peertube_video_quota }}
video_quota_daily: {{ peertube_video_quota_daily }}

# If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag
# In addition, if some resolutions are enabled the mp4 video file will be transcoded to these new resolutions.
Expand Down
4 changes: 2 additions & 2 deletions vars/ldap.sql → templates/sql/ldap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ VALUES (
'{"url": "{{ peertube_ldap.url }}",
"weight": "100",
"bind-dn": "{{ peertube_ldap.bind_dn }}",
"custom-ca": "",
"custom-ca": "{{ peertube_ldap.custom_ca }}",
"search-base": "{{ peertube_ldap.search_base }}",
"group-filter": "{{ peertube_ldap.group_filter }}",
"insecure-tls": "{{ peertube_ldap.insecure_tls }}",
"insecure-tls": {{ peertube_ldap.insecure_tls|lower }},
"mail-property": "mail",
"search-filter": "(cn={% raw %}{{username}}{% endraw %})",
"bind-credentials": "{{ peertube_ldap.bind_credentials }}",
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions templates/sql/sentences.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

TRUNCATE TABLE plugin;

UPDATE "user" set "password" = '{{ peertube_web_admin_password }}' where "username" = 'root';
4 changes: 0 additions & 4 deletions vars/sentences.sql

This file was deleted.