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.
 
 

45 lines
1.4 KiB

  1. ---
  2. # Amp puppeteer service
  3. - name: Check existence of matrix-mautrix-amp-puppeteer service
  4. stat:
  5. path: "{{ matrix_systemd_path }}/matrix-mautrix-amp-puppeteer.service"
  6. register: matrix_mautrix_amp_puppeteer_service_stat
  7. - name: Ensure matrix-mautrix-amp-puppeteer is stopped
  8. service:
  9. name: matrix-mautrix-amp-puppeteer
  10. state: stopped
  11. daemon_reload: yes
  12. when: "matrix_mautrix_amp_puppeteer_service_stat.stat.exists"
  13. - name: Ensure matrix-mautrix-amp-puppeteer.service doesn't exist
  14. file:
  15. path: "{{ matrix_systemd_path }}/matrix-mautrix-amp-puppeteer.service"
  16. state: absent
  17. when: "matrix_mautrix_amp_puppeteer_service_stat.stat.exists"
  18. # Bridge service
  19. - name: Check existence of matrix-mautrix-amp service
  20. stat:
  21. path: "{{ matrix_systemd_path }}/matrix-mautrix-amp.service"
  22. register: matrix_mautrix_amp_service_stat
  23. - name: Ensure matrix-mautrix-amp is stopped
  24. service:
  25. name: matrix-mautrix-amp
  26. state: stopped
  27. daemon_reload: yes
  28. when: "matrix_mautrix_amp_service_stat.stat.exists"
  29. - name: Ensure matrix-mautrix-amp.service doesn't exist
  30. file:
  31. path: "{{ matrix_systemd_path }}/matrix-mautrix-amp.service"
  32. state: absent
  33. when: "matrix_mautrix_samp_service_stat.stat.exists"
  34. # All services
  35. - name: Ensure systemd reloaded after matrix-mautrix-amp.service removal
  36. service:
  37. daemon_reload: yes
  38. when: "matrix_mautrix_amp_service_stat.stat.exists or matrix_mautrix_amp_puppeteer_service_stat.stat.exists"