2023-12-03 21:56:21 +00:00
|
|
|
---
|
|
|
|
# task/uninstall file for docker_systemd_service
|
2023-12-04 22:10:02 +00:00
|
|
|
- name: "Remove ENV file(s) for service(s)"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ docker_systemd_service_sysconf_dir }}/{{ docker_systemd_service_container_name }}"
|
2023-12-03 21:56:21 +00:00
|
|
|
state: absent
|
|
|
|
|
2023-12-04 22:10:02 +00:00
|
|
|
- name: "Disable and stop service(s)"
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: '{{ docker_systemd_service_name }}.service'
|
2023-12-03 21:56:21 +00:00
|
|
|
enabled: false
|
|
|
|
state: stopped
|
|
|
|
|
2023-12-04 22:10:02 +00:00
|
|
|
- name: "Remove unit file(s) for service(s)"
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/systemd/system/{{ docker_systemd_service_name }}.service
|
2023-12-03 21:56:21 +00:00
|
|
|
state: absent
|
|
|
|
|
2023-12-04 22:10:02 +00:00
|
|
|
- name: "Reload systemd units"
|
|
|
|
ansible.builtin.systemd:
|
2023-12-03 21:56:21 +00:00
|
|
|
daemon_reload: true
|
|
|
|
changed_when: false
|