Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

30 строки
1.3 KiB

  1. ---
  2. - set_fact:
  3. matrix_ansible_outdated_fail_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"
  4. - name: Fail if running on Ansible < 2.4
  5. fail:
  6. msg: "{{ matrix_ansible_outdated_fail_msg }}"
  7. when: "ansible_version.major <= 2 and ansible_version.minor < 4"
  8. # Ansible 2.5.0 and 2.5.1 are known to have a bug with `include_tasks` + `with_items`.
  9. # The bug has been fixed in Ansible 2.5.2.
  10. - name: Fail if running on Ansible 2.5.x (lower than 2.5.2)
  11. fail:
  12. msg: "{{ matrix_ansible_outdated_fail_msg }}"
  13. when: "ansible_version.major == 2 and ansible_version.minor == 5 and ansible_version.revision < 2"
  14. # This sanity check is only used to detect uppercase when people override these specific variables.
  15. #
  16. # If people set `host_specific_hostname_identity` without overriding other variables (the general use-case),
  17. # we take care to lower-case it automatically and it won't cause trouble anyway.
  18. - name: Fail if uppercase domain used
  19. fail:
  20. msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
  21. when: "item != item|lower"
  22. with_items:
  23. - "{{ hostname_identity }}"
  24. - "{{ hostname_matrix }}"
  25. - "{{ hostname_riot }}"