--- # task/uninstall file for docker_systemd_service - name: Remove ENV file for {{ service_name }}.service file: path: "{{ sysconf_dir }}/{{ container_name }}" state: absent - name: Disable and stop {{ container_name }} systemd: name: '{{ service_name }}.service' enabled: false state: stopped - name: Remove unit {{ service_name }}.service file: path: /etc/systemd/system/{{ service_name }}.service state: absent - name: Reload systemd units systemd: daemon_reload: true changed_when: false