You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
979 B
29 lines
979 B
4 years ago
|
---
|
||
|
|
||
|
- name: Check existence of matrix-dynamic-dns service
|
||
2 years ago
|
ansible.builtin.stat:
|
||
2 years ago
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service"
|
||
4 years ago
|
register: matrix_dynamic_dns_service_stat
|
||
|
|
||
|
- name: Ensure matrix-dynamic-dns is stopped
|
||
2 years ago
|
ansible.builtin.service:
|
||
4 years ago
|
name: matrix-dynamic-dns
|
||
|
state: stopped
|
||
3 years ago
|
enabled: false
|
||
|
daemon_reload: true
|
||
4 years ago
|
when: "matrix_dynamic_dns_service_stat.stat.exists"
|
||
|
|
||
|
- name: Ensure matrix-dynamic-dns.service doesn't exist
|
||
2 years ago
|
ansible.builtin.file:
|
||
2 years ago
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-dynamic-dns.service"
|
||
4 years ago
|
state: absent
|
||
|
when: "matrix_dynamic_dns_service_stat.stat.exists"
|
||
|
|
||
|
- name: Ensure systemd reloaded after matrix-dynamic-dns.service removal
|
||
2 years ago
|
ansible.builtin.service:
|
||
3 years ago
|
daemon_reload: true
|
||
4 years ago
|
when: "matrix_dynamic_dns_service_stat.stat.exists"
|
||
4 years ago
|
|
||
|
# Intentionally not removing the Docker image when uninstalling.
|
||
|
# We can't be sure it had been pulled by us in the first place.
|