Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

62 satır
2.9 KiB

  1. ---
  2. # We generally support Ansible 2.7.1 and above.
  3. - name: Fail if running on Ansible < 2.7.1
  4. fail:
  5. msg: "You are running on Ansible {{ ansible_version.string }}, which is not supported. See our guide about Ansible: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/ansible.md"
  6. when:
  7. - "(ansible_version.major < 2) or (ansible_version.major == 2 and ansible_version.minor < 7) or (ansible_version.major == 2 and ansible_version.minor == 7 and ansible_version.revision < 1)"
  8. # Though we do not support Ansible 2.9.6 which is buggy
  9. - name: Fail if running on Ansible 2.9.6 on Ubuntu
  10. fail:
  11. msg: "You are running on Ansible {{ ansible_version.string }}, which is not supported. See our guide about Ansible: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/ansible.md"
  12. when:
  13. - ansible_distribution == 'Ubuntu'
  14. - "ansible_version.major == 2 and ansible_version.minor == 9 and ansible_version.revision == 6"
  15. - name: (Deprecation) Catch and report renamed settings
  16. fail:
  17. msg: >-
  18. Your configuration contains a variable, which now has a different name.
  19. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  20. when: "item.old in vars"
  21. with_items:
  22. - {'old': 'host_specific_hostname_identity', 'new': 'matrix_domain'}
  23. - {'old': 'hostname_identity', 'new': 'matrix_domain'}
  24. - {'old': 'hostname_matrix', 'new': 'matrix_server_fqn_matrix'}
  25. - {'old': 'hostname_riot', 'new': 'matrix_server_fqn_element'}
  26. - {'old': 'matrix_server_fqn_riot', 'new': 'matrix_server_fqn_element'}
  27. - name: Fail if required variables are undefined
  28. fail:
  29. msg: "The `{{ item }}` variable must be defined and have a non-null value"
  30. with_items:
  31. - matrix_domain
  32. - matrix_server_fqn_matrix
  33. - matrix_server_fqn_element
  34. when: "item not in vars or vars[item] is none"
  35. - name: Fail if uppercase domain used
  36. fail:
  37. msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
  38. with_items:
  39. - "{{ matrix_domain }}"
  40. - "{{ matrix_server_fqn_matrix }}"
  41. - "{{ matrix_server_fqn_element }}"
  42. when: "item != item|lower"
  43. - name: Fail if using python2 on Archlinux
  44. fail:
  45. msg: "Detected that you're using python2 when installing onto Archlinux. Archlinux by default only supports python3."
  46. when:
  47. - ansible_distribution == 'Archlinux'
  48. - ansible_python.version.major != 3
  49. - name: Fail if architecture is set incorrectly
  50. fail:
  51. msg: "Detected that variable matrix_architecture {{ matrix_architecture }} appears to be set incorrectly. See docs/alternative-architectures.md. Server appears to be {{ ansible_architecture }}."
  52. when: (ansible_architecture == "x86_64" and matrix_architecture != "amd64") or
  53. (ansible_architecture == "aarch64" and matrix_architecture != "arm64") or
  54. (ansible_architecture.startswith("armv") and matrix_architecture != "arm32")