Made the adress of the database dynamic

With dynamic, i mean that it is retreived from the database host
This commit is contained in:
Egon Rijpkema
2017-05-11 16:47:03 +02:00
parent d3f131e58f
commit 8a1bee4087
2 changed files with 10 additions and 7 deletions

View File

@ -23,7 +23,7 @@
- name: install service file.
template:
src: files/keystone.service
src: templates/keystone.service
dest: /etc/systemd/system/keystone.service
mode: 644
owner: root
@ -42,7 +42,8 @@
- name: keystone manage commands to setup db
command: >
/usr/bin/docker run --rm --add-host="mariadb:172.23.38.125"
/usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys
hpc/keystone keystone-manage {{ item }}
with_items: