34 lines
963 B
YAML
34 lines
963 B
YAML
# ansible-playbook --vault-id @prompt deploy.yml -e "alt=abyayala host=hetzner"
|
|
# opcional: service define despliegue de servicio especifico
|
|
---
|
|
- hosts: "{{ host }}"
|
|
tasks:
|
|
- name: import matrix
|
|
local_action: "include_vars dir=./ files_matching={{ alt }}.yml"
|
|
|
|
- include_role: name=althost
|
|
|
|
- include_role: name=proxy
|
|
tags: proxy
|
|
|
|
- name: publish docker composition
|
|
copy:
|
|
src: "{{ local_compose_path }}/docker-compose.yml"
|
|
dest: "{{ compose_path }}/docker-compose.yml"
|
|
notify:
|
|
- deploy docker
|
|
when: service is undefined
|
|
|
|
- name: publish a mini composition for single services
|
|
copy:
|
|
src: "{{ local_compose_path }}/docker-compose.yml"
|
|
dest: "{{ compose_path }}/docker-compose-mini.yml"
|
|
notify:
|
|
- deploy service update
|
|
when: service is defined
|
|
|
|
- name: self-destruct from crontab
|
|
cron:
|
|
name: nightly deploy
|
|
state: absent
|