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.
 
 

49 satır
2.1 KiB

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