feat(ansible): add semaphore docker splash demo with dagster config

This commit is contained in:
Matteo Basile
2026-05-04 11:51:13 +02:00
commit 63aa0658ef
13 changed files with 565 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
---
- name: Deploy Docker splash app via Nginx
hosts: webservers
become: yes
vars_files:
- group_vars/all.yml
- group_vars/secrets.yml
pre_tasks:
- name: Installa pacchetti necessari (Debian/Ubuntu)
ansible.builtin.apt:
name:
- docker.io
- python3-docker
state: present
update_cache: yes
when: ansible_os_family == 'Debian'
- name: Avvia e abilita Docker
ansible.builtin.service:
name: docker
state: started
enabled: yes
roles:
- role: splash
post_tasks:
- name: Verifica endpoint health
ansible.builtin.uri:
url: "http://localhost:{{ app_port }}/health"
status_code: 200
register: healthcheck
retries: 10
delay: 2
until: healthcheck.status == 200
- name: Output finale
ansible.builtin.debug:
msg:
- "Deploy completato"
- "URL: http://{{ ansible_host }}:{{ app_port }}"
- "Container: {{ container_name }}"