Add handler so the glance container gets restarted every time the glance config file is changed

This commit is contained in:
Phil 2024-10-24 10:22:59 -06:00
parent a1ab0ae715
commit 8e54340c9e
2 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,7 @@
# roles/docker/handlers/main.yml
- name: restart glance
community.docker.docker_compose_v2:
project_src: /opt/stacks/glance
files:
- compose.yml
state: restarted

View File

@ -10,14 +10,15 @@
src: glance-compose.yml.j2
dest: /opt/stacks/glance/compose.yml
owner: root
mode: 644
mode: '0644'
- name: Template out the config file
ansible.builtin.template:
src: glance.yml.j2
dest: /opt/stacks/glance/glance.yml
owner: root
mode: 644
mode: '0644'
notify: restart glance
- name: deploy glances stack
community.docker.docker_compose_v2: