feat(element): add ansible role
This commit is contained in:
20
roles/element/tasks/main.yml
Normal file
20
roles/element/tasks/main.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
- 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"
|
Reference in New Issue
Block a user