Compare commits
2 Commits
d42d1495e9
...
482333215a
Author | SHA1 | Date | |
---|---|---|---|
|
482333215a | ||
|
b727857dae |
@ -1,28 +1,10 @@
|
||||
# Build and install a docker image for keystone.
|
||||
---
|
||||
- name: Make build and persistent directories
|
||||
- name: Make persistent directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
path: /srv/keystone/fernet-keys
|
||||
state: directory
|
||||
mode: 0777
|
||||
with_items:
|
||||
- /srv/keystone
|
||||
- /srv/keystone/fernet-keys
|
||||
|
||||
- name: install Dockerfile
|
||||
copy:
|
||||
src: files/
|
||||
dest: /srv/keystone
|
||||
|
||||
- name: keystone credentials file
|
||||
template:
|
||||
src: templates/admin-openrc.sh
|
||||
dest: /srv/keystone
|
||||
|
||||
- name: build keystone image
|
||||
docker_image:
|
||||
path: /srv/keystone
|
||||
name: hpc/keystone
|
||||
|
||||
- name: install service file.
|
||||
template:
|
||||
@ -43,6 +25,7 @@
|
||||
/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
|
||||
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}"
|
||||
hpc/keystone keystone-manage {{ item }}
|
||||
with_items:
|
||||
- db_sync
|
||||
@ -60,6 +43,7 @@
|
||||
/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
|
||||
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}"
|
||||
hpc/keystone bash /etc/bootstrap.sh
|
||||
|
||||
- name: make sure service is started
|
||||
|
@ -8,7 +8,8 @@ TimeoutStartSec=0
|
||||
Restart=always
|
||||
ExecStartPre=-/usr/bin/docker rm -f %n
|
||||
ExecStart=/usr/bin/docker run --name %n \
|
||||
--add-host=mariadb:172.23.41.2 \
|
||||
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \
|
||||
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}" \
|
||||
-p 5000:5000 -p 35357:35357 \
|
||||
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys \
|
||||
hpc/keystone
|
||||
|
Loading…
Reference in New Issue
Block a user