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.
 
 

48 lines
1.8 KiB

  1. ---
  2. - name: Ensure Conduit config path exists
  3. ansible.builtin.file:
  4. path: "{{ matrix_conduit_config_path }}"
  5. state: directory
  6. mode: 0750
  7. owner: "{{ matrix_user_username }}"
  8. group: "{{ matrix_user_groupname }}"
  9. - name: Ensure Conduit data path exists
  10. ansible.builtin.file:
  11. path: "{{ matrix_conduit_data_path }}"
  12. state: directory
  13. mode: 0770
  14. owner: "{{ matrix_user_username }}"
  15. group: "{{ matrix_user_groupname }}"
  16. - name: Ensure Conduit configuration installed
  17. ansible.builtin.template:
  18. src: "{{ role_path }}/templates/conduit/conduit.toml.j2"
  19. dest: "{{ matrix_conduit_config_path }}/conduit.toml"
  20. mode: 0644
  21. owner: "{{ matrix_user_username }}"
  22. group: "{{ matrix_user_groupname }}"
  23. - name: Ensure Conduit container network is created
  24. community.general.docker_network:
  25. name: "{{ matrix_conduit_container_network }}"
  26. driver: bridge
  27. - name: Ensure Conduit container image is pulled
  28. community.docker.docker_image:
  29. name: "{{ matrix_conduit_docker_image }}"
  30. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  31. force_source: "{{ matrix_conduit_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  32. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_conduit_docker_image_force_pull }}"
  33. register: result
  34. retries: "{{ devture_playbook_help_container_retries_count }}"
  35. delay: "{{ devture_playbook_help_container_retries_delay }}"
  36. until: result is not failed
  37. - name: Ensure matrix-conduit.service installed
  38. ansible.builtin.template:
  39. src: "{{ role_path }}/templates/conduit/systemd/matrix-conduit.service.j2"
  40. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-conduit.service"
  41. mode: 0644