Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

46 wiersze
1.9 KiB

  1. ---
  2. # We generally support Ansible 2.7.0 and above.
  3. - name: Fail if running on Ansible < 2.7
  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: "(ansible_version.major < 2) or (ansible_version.major <= 2 and ansible_version.minor < 7)"
  7. - name: (Deprecation) Catch and report renamed settings
  8. fail:
  9. msg: >-
  10. Your configuration contains a variable, which now has a different name.
  11. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  12. when: "item.old in vars"
  13. with_items:
  14. - {'old': 'host_specific_hostname_identity', 'new': 'matrix_domain'}
  15. - {'old': 'hostname_identity', 'new': 'matrix_domain'}
  16. - {'old': 'hostname_matrix', 'new': 'matrix_server_fqn_matrix'}
  17. - {'old': 'hostname_riot', 'new': 'matrix_server_fqn_element'}
  18. - {'old': 'matrix_server_fqn_riot', 'new': 'matrix_server_fqn_element'}
  19. - name: Fail if required variables are undefined
  20. fail:
  21. msg: "The `{{ item }}` variable must be defined and have a non-null value"
  22. with_items:
  23. - matrix_domain
  24. - matrix_server_fqn_matrix
  25. - matrix_server_fqn_element
  26. when: "item not in vars or vars[item] is none"
  27. - name: Fail if uppercase domain used
  28. fail:
  29. msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
  30. with_items:
  31. - "{{ matrix_domain }}"
  32. - "{{ matrix_server_fqn_matrix }}"
  33. - "{{ matrix_server_fqn_element }}"
  34. when: "item != item|lower"
  35. - name: Fail if using python2 on Archlinux
  36. fail:
  37. msg: "Detected that you're using python2 when installing onto Archlinux. Archlinux by default only supports python3."
  38. when:
  39. - ansible_distribution == 'Archlinux'
  40. - ansible_python.version.major != 3