mariadb.yml aktualisiert

This commit is contained in:
olli 2024-05-26 22:54:18 +02:00
parent 9ffb8ceb2c
commit bc8259a5ca

View File

@ -130,7 +130,6 @@
restart: unless-stopped
networks:
- mariadb.{{inventory_hostname}}--network
hostname: mysq
volumes:
- ./db-data:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
@ -184,61 +183,19 @@
backup: yes
notify: Restart mariadb
- name: Start mariadb
ansible.builtin.shell: docker-compose up -d --force-recreate
args:
chdir: /home/docker/mariadb.{{inventory_hostname}}
creates: /home/docker/mariadb.{{inventory_hostname}}/db-data/ibdata1
# - name: Start mariadb
# ansible.builtin.shell: docker-compose up -d --force-recreate
# args:
# chdir: /home/docker/mariadb.{{inventory_hostname}}
# creates: /home/docker/mariadb.{{inventory_hostname}}/db-data/ibdata1
- name: Wait until mariadb install is finished
wait_for:
path: /home/docker/mariadb.{{inventory_hostname}}/db-data/ibdata1
#- name: /home/docker/mariadb.{{inventory_hostname}}/mariadb.init.sh
# blockinfile:
# path: /home/docker/mariadb.{{inventory_hostname}}/mariadb.init.sh
# mode: "0500"
# owner: root
# group: root
# create: yes
# marker: "# {mark} ANSIBLE MANAGED BLOCK"
# block: |
# cd /home/docker/mariadb.{{inventory_hostname}}
# until wget -t1 --timeout=15 https://mariadb.{{inventory_hostname}} >/dev/null 2>&1
# do
# sleep 5
# done
# # [ ...]
# backup: yes
# validate: /bin/bash -n %s
# notify: run mariadb.init
#
#- name: Run mariadb.init after install
# ansible.builtin.shell: bash /home/docker/mariadb.{{inventory_hostname}}/mariadb.init.sh
# args:
# chdir: /home/docker/mariadb.{{inventory_hostname}}
# creates: /home/docker/mariadb.{{inventory_hostname}}/mariadb.init.log
handlers:
#- name: run genpw.sh
# ansible.builtin.shell: ./genpw.sh
# args:
# chdir: /home/docker/mariadb.{{inventory_hostname}}
# notify: Restart mariadb
#
# - name: run genssl.sh
# ansible.builtin.shell: ./genssl.sh
# args:
# chdir: /home/docker/mariadb.{{inventory_hostname}}
# notify: Restart mariadb
#- name: run mariadb.init
# ansible.builtin.shell: bash /home/docker/mariadb.{{inventory_hostname}}/mariadb.init.sh
- name: Restart mariadb
ansible.builtin.shell: docker-compose up -d --force-recreate
args: