Refactor docker recreate and rebuild flags
This commit is contained in:
parent
8f026330d7
commit
40802d9d4f
24 changed files with 61 additions and 82 deletions
3
playbooks/roles/teamspeak_fallback/handlers/main.yml
Normal file
3
playbooks/roles/teamspeak_fallback/handlers/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Restart service {{ role_name }}
|
||||
ansible.builtin.include_tasks: tasks/restart-service.yml
|
|
@ -33,12 +33,7 @@
|
|||
src: yml.j2
|
||||
dest: "{{ (config_path, 'hooks.yml') | path_join }}"
|
||||
mode: "0644"
|
||||
register: cmd_result
|
||||
|
||||
- name: Set the docker force-recreate flag
|
||||
ansible.builtin.set_fact:
|
||||
docker_force_recreate: --force-recreate
|
||||
when: cmd_result.changed # noqa: no-handler We need to handle the restart per service. Handlers don't support variables.
|
||||
notify: Restart service {{ role_name }}
|
||||
|
||||
- name: Copy the teamspeak-fallback-db script
|
||||
ansible.builtin.copy:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue