Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

63 lignes
2.5 KiB

  1. ---
  2. - name: Ensure Fluffygate paths exists
  3. ansible.builtin.file:
  4. path: "{{ item }}"
  5. state: directory
  6. mode: 0750
  7. owner: "{{ matrix_user_username }}"
  8. group: "{{ matrix_user_groupname }}"
  9. with_items:
  10. - "{{ matrix_fluffygate_base_path }}"
  11. - "{{ matrix_fluffygate_config_path }}"
  12. - "{{ matrix_fluffygate_data_path }}"
  13. - name: Ensure Fluffygate config installed
  14. ansible.builtin.copy:
  15. content: "{{ matrix_fluffygate_configuration | to_nice_yaml(indent=2, width=999999) }}"
  16. dest: "{{ matrix_fluffygate_config_path }}/config.yaml"
  17. mode: 0640
  18. owner: "{{ matrix_user_username }}"
  19. group: "{{ matrix_user_groupname }}"
  20. - name: Ensure Firebase key file is created when enabled
  21. ansible.builtin.copy:
  22. content: "{{ matrix_fluffygate_firebase_key }}"
  23. dest: "{{ matrix_fluffygate_data_path }}/firebase-key.json"
  24. mode: 0600
  25. owner: "{{ matrix_user_username }}"
  26. group: "{{ matrix_user_groupname }}"
  27. when: matrix_fluffygate_firebase_key != ''
  28. - name: Ensure Fluffygate labels installed
  29. ansible.builtin.template:
  30. src: "{{ role_path }}/templates/labels.j2"
  31. dest: "{{ matrix_fluffygate_base_path }}/labels"
  32. mode: 0640
  33. owner: "{{ matrix_user_username }}"
  34. group: "{{ matrix_user_groupname }}"
  35. - name: Ensure Fluffygate image is pulled
  36. community.docker.docker_image:
  37. name: "{{ matrix_fluffygate_docker_image }}"
  38. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  39. force_source: "{{ matrix_fluffygate_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  40. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_fluffygate_docker_image_force_pull }}"
  41. register: result
  42. retries: "{{ devture_playbook_help_container_retries_count }}"
  43. delay: "{{ devture_playbook_help_container_retries_delay }}"
  44. until: result is not failed
  45. - name: Ensure Fluffygate container network is created
  46. community.general.docker_network:
  47. enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
  48. name: "{{ matrix_fluffygate_container_network }}"
  49. driver: bridge
  50. driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
  51. - name: Ensure matrix-fluffygate.service installed
  52. ansible.builtin.template:
  53. src: "{{ role_path }}/templates/systemd/matrix-fluffygate.service.j2"
  54. dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-fluffygate.service"
  55. mode: 0644