Optimized delays

This commit is contained in:
Kevin Veen-Birkenbach 2024-01-06 16:50:31 +01:00
parent 438f63de45
commit b9973dd4bf
4 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# General # General
reset_files: false # Cleans up all CyMaIS files. It's necessary to run to whole playbook and not particial roles when using this function. reset_files: false # Cleans up all CyMaIS files. It's necessary to run to whole playbook and not particial roles when using this function.
verbose: false # Prints well formated debug information verbose: false # Prints well formated debug information
database_delay: "0" # Database delay to wait for the central database before continue tasks
top_domain: "localhost" # Change this in inventory to your domain top_domain: "localhost" # Change this in inventory to your domain
ip4_address: "127.0.0.1" # Change thie in inventory to the ip address of your server ip4_address: "127.0.0.1" # Change thie in inventory to the ip address of your server
backups_folder_path: "/Backups/" # Path to the backups folder backups_folder_path: "/Backups/" # Path to the backups folder

View File

@ -66,6 +66,14 @@
meta: flush_handlers meta: flush_handlers
when: setup | bool when: setup | bool
- name: wait for database
wait_for:
host: 127.0.0.1
port: "{{ http_port }}"
delay: "{{database_delay}}"
timeout: 300
when: setup | bool
- name: execute database migration - name: execute database migration
command: command:
cmd: "docker compose -p mailu exec admin flask mailu admin admin {{top_domain}} {{mailu_initial_root_password}}" cmd: "docker compose -p mailu exec admin flask mailu admin admin {{top_domain}} {{mailu_initial_root_password}}"

View File

@ -42,7 +42,7 @@
wait_for: wait_for:
host: 127.0.0.1 host: 127.0.0.1
port: 3306 port: 3306
delay: 10 delay: "{{database_delay}}"
timeout: 300 timeout: 300
when: run_once_docker_mariadb is not defined when: run_once_docker_mariadb is not defined

View File

@ -31,7 +31,7 @@
wait_for: wait_for:
host: "127.0.0.1" host: "127.0.0.1"
port: "5432" port: "5432"
delay: 0 delay: "{{database_delay}}"
timeout: 300 timeout: 300
when: run_once_docker_postgres is not defined when: run_once_docker_postgres is not defined