feat(element): add ansible role

This commit is contained in:
2024-09-19 18:04:57 +02:00
parent dedbb72b70
commit e35f040229
11 changed files with 212 additions and 0 deletions

View 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"