Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

60 Zeilen
2.2 KiB

  1. ---
  2. - name: Ensure hookshot image is pulled
  3. docker_image:
  4. name: "{{ matrix_hookshot_docker_image }}"
  5. source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
  6. force_source: "{{ matrix_hookshot_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
  7. force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_hookshot_docker_image_force_pull }}"
  8. - name: Ensure hookshot paths exist
  9. file:
  10. path: "{{ item }}"
  11. state: directory
  12. mode: 0750
  13. owner: "{{ matrix_user_username }}"
  14. group: "{{ matrix_user_groupname }}"
  15. with_items:
  16. - "{{ matrix_hookshot_base_path }}"
  17. # - name: Ensure openssl is installed (#1510)
  18. - name: Check if hookshot passkey exists
  19. stat:
  20. path: "{{ matrix_hookshot_base_path }}/passkey.pem"
  21. register: hookshot_passkey_file
  22. - name: Generate hookshot passkey if it doesn't exist
  23. shell: "{{ matrix_host_command_openssl }} genpkey -out {{ matrix_hookshot_base_path }}/passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096"
  24. become: true
  25. become_user: "{{ matrix_user_username }}"
  26. when: "not hookshot_passkey_file.stat.exists"
  27. - name: Ensure hookshot config.yaml installed if provided
  28. copy:
  29. content: "{{ matrix_hookshot_configuration|to_nice_yaml }}"
  30. dest: "{{ matrix_hookshot_base_path }}/config.yaml"
  31. mode: 0644
  32. owner: "{{ matrix_user_username }}"
  33. group: "{{ matrix_user_groupname }}"
  34. - name: Ensure hookshot registration.yaml installed if provided
  35. copy:
  36. content: "{{ matrix_hookshot_registration|to_nice_yaml }}"
  37. dest: "{{ matrix_hookshot_base_path }}/registration.yaml"
  38. mode: 0644
  39. owner: "{{ matrix_user_username }}"
  40. group: "{{ matrix_user_groupname }}"
  41. - name: Ensure matrix-hookshot.service installed
  42. template:
  43. src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2"
  44. dest: "{{ matrix_systemd_path }}/matrix-hookshot.service"
  45. mode: 0644
  46. register: matrix_hookshot_systemd_service_result
  47. - name: Ensure systemd reloaded after matrix-hookshot.service installation
  48. service:
  49. daemon_reload: yes
  50. when: matrix_hookshot_systemd_service_result.changed