feat(cinny): add ansible role

This commit is contained in:
2024-09-19 18:04:30 +02:00
parent 6790f4d2d3
commit dedbb72b70
21 changed files with 439 additions and 0 deletions

View File

@ -0,0 +1,23 @@
---
- name: Check if state is valid
ansible.builtin.fail:
msg: "Unknown state '{{ cinny_state }}'. Valid states are {{ cinny_states | join(', ') }}"
when: cinny_state not in cinny_states
- name: Check if deployment method is supported
ansible.builtin.fail:
msg: "Deployment method '{{ cinny_deployment_method }}' is not supported! (supported are: {{ cinny_deployment_methods | join(', ') }})"
when: cinny_deployment_method not in cinny_deployment_methods
- name: Include base configuration
ansible.builtin.include_tasks:
file: configure.yml
- name: Deploy tarball if required
ansible.builtin.include_tasks:
file: deploy-tarball.yml
when: cinny_deployment_method in cinny_needs_tarball
- name: Deploy using {{ cinny_deployment_method }}
ansible.builtin.include_tasks:
file: "deploy-{{ cinny_deployment_method }}.yml"