mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-27 07:01:03 +01:00
Compare commits
No commits in common. "bb9daf27e5d6ea3dd52dcdb52a705e00a00223b1" and "72ee7f2fce5efbc62d9a99d268765f433baa025a" have entirely different histories.
bb9daf27e5
...
72ee7f2fce
@ -115,9 +115,6 @@ nginx_upstreams_directory: "{{nginx_configuration_directory}}upstreams/"
|
||||
enable_central_database: true
|
||||
enable_central_database_mailu: "{{enable_central_database}}"
|
||||
|
||||
### Enable Storage Optimizer for Docker Volumes
|
||||
enable_system_storage_optimizer: true
|
||||
|
||||
### Domain Names for Various Services
|
||||
domain_akaunting: "akaunting.{{top_domain}}"
|
||||
domain_baserow: "baserow.{{top_domain}}"
|
||||
@ -158,7 +155,7 @@ akaunting_company_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
||||
akaunting_setup_admin_email: "DUMMY_VALUE_NEEDS_TO_BE_CHANGED"
|
||||
|
||||
#### Big Blue Button
|
||||
bigbluebutton_enable_greenlight: "true"
|
||||
bigbluebutton_enable_greenlight: "false"
|
||||
|
||||
#### Listmonk
|
||||
listmonk_admin_username: "admin"
|
||||
|
@ -3,4 +3,4 @@
|
||||
become: true
|
||||
roles:
|
||||
- role: system-storage-optimizer
|
||||
when: (path_mass_storage or path_rapid_storage) and enable_system_storage_optimizer | bool
|
||||
when: path_mass_storage or path_rapid_storage
|
@ -46,23 +46,14 @@
|
||||
state: absent
|
||||
when: mode_reset | bool and run_once_backup_docker_to_local is not defined
|
||||
|
||||
- name: Display all database variables
|
||||
debug:
|
||||
msg: |
|
||||
database_instance: "{{ database_instance | default('undefined') }}"
|
||||
database_name: "{{ database_name | default('undefined') }}"
|
||||
database_username: "{{ database_username | default('undefined') }}"
|
||||
database_password: "{{ database_password | default('undefined') }}"
|
||||
when: mode_verbose | bool
|
||||
|
||||
- name: seed database values
|
||||
command:
|
||||
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}"
|
||||
chdir: "{{backup_docker_to_local_folder}}"
|
||||
when: >
|
||||
database_instance is defined and
|
||||
database_name is defined and
|
||||
database_username is defined and
|
||||
database_host is defined or
|
||||
database_name is defined or
|
||||
database_username is defined or
|
||||
database_password is defined
|
||||
|
||||
- name: Set file permissions for databases.csv to be readable, writable, and executable by root only
|
||||
@ -72,9 +63,9 @@
|
||||
owner: root
|
||||
group: root
|
||||
when: >
|
||||
(database_instance is defined and
|
||||
database_name is defined and
|
||||
database_username is defined and
|
||||
(database_host is defined or
|
||||
database_name is defined or
|
||||
database_username is defined or
|
||||
database_password is defined) and
|
||||
run_once_backup_docker_to_local_file_permission is not defined
|
||||
register: file_permission_result
|
||||
|
@ -5,6 +5,8 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
@ -7,12 +7,13 @@ Role to deploy [BigBlueButton](https://bigbluebutton.org/).
|
||||
|
||||
### cleanup
|
||||
```bash
|
||||
docker compose down -v
|
||||
docker-compose down;
|
||||
docker volume rm bigbluebutton_bigbluebutton bigbluebutton_html5-static bigbluebutton_vol-freeswitch bigbluebutton_vol-kurento bigbluebutton_vol-mediasoup bigbluebutton_database
|
||||
```
|
||||
|
||||
### check container status
|
||||
```bash
|
||||
watch -n 2 "docker compose ps -a"
|
||||
watch -n 2 "docker ps -a | grep bigbluebutton"
|
||||
```
|
||||
|
||||
### database access
|
||||
|
@ -7,31 +7,6 @@
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
||||
listen: setup bigbluebutton
|
||||
|
||||
- name: replace postgres bind mount by volume mount
|
||||
replace:
|
||||
path: "{{docker_compose_file}}"
|
||||
regexp: '\./postgres-data:/var/lib/postgresql/data'
|
||||
replace: 'postgres-data:/var/lib/postgresql/data'
|
||||
listen: setup bigbluebutton
|
||||
|
||||
- name: replace greenlight bind mount by volume mount
|
||||
replace:
|
||||
path: "{{docker_compose_file}}"
|
||||
regexp: '\./greenlight-data:/usr/src/app/storage'
|
||||
replace: 'greenlight-data:/usr/src/app/storage'
|
||||
listen: setup bigbluebutton
|
||||
|
||||
- name: add volumes to docker compose
|
||||
blockinfile:
|
||||
path: "{{docker_compose_file}}"
|
||||
block: |2
|
||||
postgres-data:
|
||||
greenlight-data:
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK FOR VOLUMES"
|
||||
insertafter: "html5-static:"
|
||||
listen: setup bigbluebutton
|
||||
|
||||
- name: docker compose up bigbluebutton
|
||||
command:
|
||||
cmd: docker-compose -p bigbluebutton up -d --force-recreate
|
||||
|
@ -1,6 +1,10 @@
|
||||
---
|
||||
- name: "include docker-compose-common.yml"
|
||||
include_tasks: docker-compose-common.yml
|
||||
- name: include docker vars
|
||||
include_vars: vars/docker-common.yml.j2
|
||||
|
||||
- name: load docker compose dependencies
|
||||
include_role:
|
||||
name: docker-compose
|
||||
|
||||
- name: "include task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
@ -30,24 +34,3 @@
|
||||
- name: deploy .env
|
||||
template: src=env.j2 dest={{docker_compose_instance_directory}}/.env
|
||||
notify: setup bigbluebutton
|
||||
|
||||
- name: flush docker service
|
||||
meta: flush_handlers
|
||||
|
||||
- name: wait for database
|
||||
pause:
|
||||
seconds: "{{database_delay}}"
|
||||
when: mode_setup | bool
|
||||
|
||||
- name: create admin
|
||||
command:
|
||||
cmd: docker compose exec greenlight bundle exec rake admin:create
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
when: mode_setup | bool
|
||||
ignore_errors: true
|
||||
register: admin_creation_result
|
||||
|
||||
- name: print admin user data
|
||||
debug:
|
||||
msg: "{{ admin_creation_result.stdout }}"
|
||||
when: admin_creation_result is defined
|
@ -1,6 +1,6 @@
|
||||
server {
|
||||
listen 443 ssl http2 default_server;
|
||||
listen [::]:443 ssl http2 default_server;
|
||||
# listen 443 ssl http2 default_server;
|
||||
# listen [::]:443 ssl http2 default_server;
|
||||
server_name {{domain}};
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
|
||||
|
@ -1,6 +1,6 @@
|
||||
docker_compose_project_name: "bigbluebutton"
|
||||
docker_compose_file: "{{docker_compose_instance_directory}}/docker-compose.yml"
|
||||
database_instance: "bigbluebutton"
|
||||
database_name: "greenlight-v3"
|
||||
database_username: "postgres"
|
||||
database_password: "{{bigbluebutton_postgresql_secret}}"
|
||||
docker_compose_project_name: "bigbluebutton"
|
||||
#database_host: "postgres" # needs to be fixed
|
||||
#database_name: "greenlight-v3"
|
||||
#database_username: "postgres"
|
||||
#database_password: ""
|
||||
#database_type: "postgres"
|
@ -5,6 +5,7 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
@ -5,6 +5,7 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
@ -8,6 +8,7 @@
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
@ -5,6 +5,7 @@
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
|
@ -14,6 +14,7 @@
|
||||
domain: "{{element_domain}}"
|
||||
http_port: "{{element_http_port}}"
|
||||
|
||||
|
||||
#- name: "create {{docker_compose_instance_directory}}mautrix_whatsapp"
|
||||
# file:
|
||||
# path: "{{docker_compose_instance_directory}}mautrix_whatsapp"
|
||||
|
@ -17,6 +17,7 @@
|
||||
dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
|
||||
notify: docker compose project setup
|
||||
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template:
|
||||
src: docker-compose.yml.j2
|
||||
|
@ -8,6 +8,7 @@
|
||||
loop_control:
|
||||
loop_var: domain
|
||||
|
||||
|
||||
- name: copy docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
@ -25,11 +25,8 @@ def start_containers(containers):
|
||||
run_command(f"docker start {container_list}")
|
||||
|
||||
def is_database(image):
|
||||
databases = {"postgres", "mariadb", "redis", "memcached", "mongo"}
|
||||
# Split the string at the colon and take the first part
|
||||
prefix = image.split(':')[0]
|
||||
# Check if the prefix is in the database names
|
||||
return prefix in databases
|
||||
databases = {"postgres", "mariadb", "redis", "memcached"}
|
||||
return any(database in image for database in databases)
|
||||
|
||||
def is_symbolic_link(file_path):
|
||||
return os.path.islink(file_path)
|
||||
|
Loading…
Reference in New Issue
Block a user