diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml new file mode 100644 index 0000000..3a5a230 --- /dev/null +++ b/roles/docker/handlers/main.yml @@ -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 \ No newline at end of file diff --git a/roles/docker/tasks/glance.yml b/roles/docker/tasks/glance.yml index 2a3538a..e980896 100644 --- a/roles/docker/tasks/glance.yml +++ b/roles/docker/tasks/glance.yml @@ -1,6 +1,6 @@ - name: make glance directories ansible.builtin.file: - path: "{{ item}}" + path: "{{ item }}" state: directory loop: - /opt/stacks/glance @@ -10,17 +10,18 @@ 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: project_src: /opt/stacks/glance files: - - compose.yml \ No newline at end of file + - compose.yml \ No newline at end of file