Implemented check for seeder to deal with anomaly. See: https://chat.openai.com/share/97827ab4-4589-4a9d-b056-55aad63ce22c

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-13 16:19:11 +01:00
parent 72ee7f2fce
commit 7745105a23
11 changed files with 19 additions and 18 deletions

View File

@ -46,14 +46,25 @@
state: absent state: absent
when: mode_reset | bool and run_once_backup_docker_to_local is not defined 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') }}"
database_host: "{{ database_host | default('undefined') }}"
database_type: "{{ database_type | default('undefined') }}"
when: mode_verbose | bool
- name: seed database values - name: seed database values
command: command:
cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}" cmd: "python database_entry_seeder.py databases.csv {{database_instance}} {{database_name}} {{database_username}} {{database_password}}"
chdir: "{{backup_docker_to_local_folder}}" chdir: "{{backup_docker_to_local_folder}}"
when: > when: >
database_host is defined or database_instance is defined and
database_name is defined or database_name is defined and
database_username is defined or database_username is defined and
database_password is defined database_password is defined
- name: Set file permissions for databases.csv to be readable, writable, and executable by root only - name: Set file permissions for databases.csv to be readable, writable, and executable by root only
@ -63,9 +74,9 @@
owner: root owner: root
group: root group: root
when: > when: >
(database_host is defined or (database_instance is defined and
database_name is defined or database_name is defined and
database_username is defined or database_username is defined and
database_password is defined) and database_password is defined) and
run_once_backup_docker_to_local_file_permission is not defined run_once_backup_docker_to_local_file_permission is not defined
register: file_permission_result register: file_permission_result

View File

@ -5,8 +5,6 @@
- name: "include tasks nginx-docker-proxy-domain.yml" - name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup notify: docker compose project setup

View File

@ -1,6 +1,6 @@
server { 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}}; server_name {{domain}};
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem; ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;

View File

@ -2,5 +2,4 @@ docker_compose_project_name: "bigbluebutton"
#database_host: "postgres" # needs to be fixed #database_host: "postgres" # needs to be fixed
#database_name: "greenlight-v3" #database_name: "greenlight-v3"
#database_username: "postgres" #database_username: "postgres"
#database_password: ""
#database_type: "postgres" #database_type: "postgres"

View File

@ -5,7 +5,6 @@
- name: "include tasks nginx-docker-proxy-domain.yml" - name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup notify: docker compose project setup

View File

@ -5,7 +5,6 @@
- name: "include tasks nginx-docker-proxy-domain.yml" - name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup notify: docker compose project setup

View File

@ -8,7 +8,6 @@
loop_control: loop_control:
loop_var: domain loop_var: domain
- name: add docker-compose.yml - name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup notify: docker compose project setup

View File

@ -5,7 +5,6 @@
- name: "include tasks nginx-docker-proxy-domain.yml" - name: "include tasks nginx-docker-proxy-domain.yml"
include_tasks: nginx-docker-proxy-domain.yml include_tasks: nginx-docker-proxy-domain.yml
- name: add docker-compose.yml - name: add docker-compose.yml
template: template:
src: "docker-compose.yml.j2" src: "docker-compose.yml.j2"

View File

@ -14,7 +14,6 @@
domain: "{{element_domain}}" domain: "{{element_domain}}"
http_port: "{{element_http_port}}" http_port: "{{element_http_port}}"
#- name: "create {{docker_compose_instance_directory}}mautrix_whatsapp" #- name: "create {{docker_compose_instance_directory}}mautrix_whatsapp"
# file: # file:
# path: "{{docker_compose_instance_directory}}mautrix_whatsapp" # path: "{{docker_compose_instance_directory}}mautrix_whatsapp"

View File

@ -17,7 +17,6 @@
dest: "{{path_docker_volumes}}nextcloud/nginx.conf" dest: "{{path_docker_volumes}}nextcloud/nginx.conf"
notify: docker compose project setup notify: docker compose project setup
- name: add docker-compose.yml - name: add docker-compose.yml
template: template:
src: docker-compose.yml.j2 src: docker-compose.yml.j2

View File

@ -8,7 +8,6 @@
loop_control: loop_control:
loop_var: domain loop_var: domain
- name: copy docker-compose.yml - name: copy docker-compose.yml
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
notify: docker compose project setup notify: docker compose project setup