Matrix Docker Ansible eploy
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
937 B

  1. ---
  2. - name: Check existence of matrix-dynamic-dns service
  3. ansible.builtin.stat:
  4. path: "{{ matrix_systemd_path }}/matrix-dynamic-dns.service"
  5. register: matrix_dynamic_dns_service_stat
  6. - name: Ensure matrix-dynamic-dns is stopped
  7. ansible.builtin.service:
  8. name: matrix-dynamic-dns
  9. state: stopped
  10. enabled: false
  11. daemon_reload: true
  12. when: "matrix_dynamic_dns_service_stat.stat.exists"
  13. - name: Ensure matrix-dynamic-dns.service doesn't exist
  14. ansible.builtin.file:
  15. path: "{{ matrix_systemd_path }}/matrix-dynamic-dns.service"
  16. state: absent
  17. when: "matrix_dynamic_dns_service_stat.stat.exists"
  18. - name: Ensure systemd reloaded after matrix-dynamic-dns.service removal
  19. ansible.builtin.service:
  20. daemon_reload: true
  21. when: "matrix_dynamic_dns_service_stat.stat.exists"
  22. # Intentionally not removing the Docker image when uninstalling.
  23. # We can't be sure it had been pulled by us in the first place.