27 lines
1.1 KiB
YAML
27 lines
1.1 KiB
YAML
---
|
|
|
|
- name: Fail if required variables are undefined
|
|
fail:
|
|
msg: "The `{{ item }}` variable must be defined and have a non-null value"
|
|
with_items:
|
|
- matrix_domain
|
|
- matrix_server_fqn_matrix
|
|
- matrix_server_fqn_element
|
|
when: "item not in vars or vars[item] is none"
|
|
|
|
- name: Fail if uppercase domain used
|
|
fail:
|
|
msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
|
|
with_items:
|
|
- "{{ matrix_domain }}"
|
|
- "{{ matrix_server_fqn_matrix }}"
|
|
- "{{ matrix_server_fqn_element }}"
|
|
when: "item != item|lower"
|
|
|
|
- name: Fail if architecture is set incorrectly
|
|
fail:
|
|
msg: "Detected that variable matrix_architecture {{ matrix_architecture }} appears to be set incorrectly. See docs/alternative-architectures.md. Server appears to be {{ ansible_architecture }}."
|
|
when: (ansible_architecture == "x86_64" and matrix_architecture != "amd64") or
|
|
(ansible_architecture == "aarch64" and matrix_architecture != "arm64") or
|
|
(ansible_architecture.startswith("armv") and matrix_architecture != "arm32")
|