Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

48 righe
1.3 KiB

  1. ---
  2. - block:
  3. - name: Ensure matrix-ip6tables.service exists
  4. template:
  5. src: "{{ role_path }}/templates/{{ item }}.j2"
  6. dest: "{{ matrix_systemd_path }}/{{ item }}"
  7. owner: "root"
  8. group: "root"
  9. mode: 0644
  10. with_items:
  11. - matrix-ip6tables.service
  12. register: matrix_ip6tables_systemd_service_result
  13. - name: Ensure systemd reloaded after matrix-ip6tables.service installation
  14. service:
  15. daemon_reload: yes
  16. when: "matrix_ip6tables_systemd_service_result.changed"
  17. - name: Ensure matrix-ip6tables.service is started and autoruns
  18. service:
  19. name: matrix-ip6tables
  20. state: started
  21. enabled: yes
  22. when: "matrix_docker_ipv6_enabled|bool"
  23. - block:
  24. - name: Check existence of matrix-ip6tables service
  25. stat:
  26. path: "{{ matrix_systemd_path }}/matrix-ip6tables.service"
  27. register: matrix_ip6tables_service_stat
  28. - name: Ensure matrix-ip6tables.service doesn't exist
  29. file:
  30. path: "{{ matrix_systemd_path }}/matrix-ip6tables.service"
  31. state: absent
  32. when: "matrix_ip6tables_service_stat.stat.exists"
  33. - name: Ensure systemd reloaded after matrix-ip6tables.service removal
  34. service:
  35. daemon_reload: yes
  36. when: "matrix_ip6tables_service_stat.stat.exists"
  37. when: "not matrix_docker_ipv6_enabled|bool"