From 417fff924d04c7371d164c71a25d944899169c41 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 22 Feb 2023 14:53:02 -0500 Subject: [PATCH] change playbook to use hostname --- salt/mysql/init.sls | 6 ++---- salt/playbook/init.sls | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/salt/mysql/init.sls b/salt/mysql/init.sls index 30e39aa86..ba78476dc 100644 --- a/salt/mysql/init.sls +++ b/salt/mysql/init.sls @@ -91,10 +91,8 @@ so-mysql: {% for BINDING in DOCKER.containers['so-mysql'].port_bindings %} - {{ BINDING }} {% endfor %} - - extra_hosts: - - {{ GLOBALS.manager }}:{{ GLOBALS.so_docker_bip }} - environment: - - MYSQL_ROOT_HOST={{ GLOBALS.manager }} + - MYSQL_ROOT_HOST={{ GLOBALS.so_docker_bip }} - MYSQL_ROOT_PASSWORD=/etc/mypass - binds: - /opt/so/conf/mysql/etc/my.cnf:/etc/my.cnf:ro @@ -107,7 +105,7 @@ so-mysql: - file: mysqlcnf - file: mysqlpass cmd.run: - - name: until nc -z {{ GLOBALS.manager }} 3306; do sleep 1; done + - name: until nc -z {{ GLOBALS.so_docker_bip }} 3306; do sleep 1; done - timeout: 600 - onchanges: - docker_container: so-mysql diff --git a/salt/playbook/init.sls b/salt/playbook/init.sls index 5fe9ab92f..f2a9d4614 100644 --- a/salt/playbook/init.sls +++ b/salt/playbook/init.sls @@ -86,7 +86,7 @@ so-playbook: - binds: - /opt/so/log/playbook:/playbook/log:rw - extra_hosts: - - {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }} + - {{ GLOBALS.manager }}:{{ GLOBALS.so_docker_bip }} - environment: - REDMINE_DB_MYSQL={{ GLOBALS.manager }} - REDMINE_DB_DATABASE=playbook