change playbook to use hostname

This commit is contained in:
Mike Reeves
2023-02-22 14:53:02 -05:00
parent 1c1e613351
commit 417fff924d
2 changed files with 3 additions and 5 deletions

View File

@@ -91,10 +91,8 @@ so-mysql:
{% for BINDING in DOCKER.containers['so-mysql'].port_bindings %} {% for BINDING in DOCKER.containers['so-mysql'].port_bindings %}
- {{ BINDING }} - {{ BINDING }}
{% endfor %} {% endfor %}
- extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.so_docker_bip }}
- environment: - environment:
- MYSQL_ROOT_HOST={{ GLOBALS.manager }} - MYSQL_ROOT_HOST={{ GLOBALS.so_docker_bip }}
- MYSQL_ROOT_PASSWORD=/etc/mypass - MYSQL_ROOT_PASSWORD=/etc/mypass
- binds: - binds:
- /opt/so/conf/mysql/etc/my.cnf:/etc/my.cnf:ro - /opt/so/conf/mysql/etc/my.cnf:/etc/my.cnf:ro
@@ -107,7 +105,7 @@ so-mysql:
- file: mysqlcnf - file: mysqlcnf
- file: mysqlpass - file: mysqlpass
cmd.run: 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 - timeout: 600
- onchanges: - onchanges:
- docker_container: so-mysql - docker_container: so-mysql

View File

@@ -86,7 +86,7 @@ so-playbook:
- binds: - binds:
- /opt/so/log/playbook:/playbook/log:rw - /opt/so/log/playbook:/playbook/log:rw
- extra_hosts: - extra_hosts:
- {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }} - {{ GLOBALS.manager }}:{{ GLOBALS.so_docker_bip }}
- environment: - environment:
- REDMINE_DB_MYSQL={{ GLOBALS.manager }} - REDMINE_DB_MYSQL={{ GLOBALS.manager }}
- REDMINE_DB_DATABASE=playbook - REDMINE_DB_DATABASE=playbook