matrix/roles/element/tasks/main.yml

21 lines
734 B
YAML

---
- name: Check if state is valid
ansible.builtin.fail:
msg: "Unknown state '{{ element_state }}'. Valid states are {{ element_states | join(', ') }}"
when: element_state not in element_states
- name: Check if deployment method is supported
ansible.builtin.fail:
msg: >-
Deployment method '{{ element_deployment_method }}' is not supported!
Supported are: {{ element_deployment_methods | join(', ') }}
when: element_deployment_method not in element_deployment_methods
- name: Include base configuration
ansible.builtin.include_tasks:
file: configure.yml
- name: Deploy using {{ element_deployment_method }}
ansible.builtin.include_tasks:
file: "deploy-{{ element_deployment_method }}.yml"