yt-dlp-dags/ansible/playbook-full.yml

34 lines
931 B
YAML

---
- name: Deploy entire Airflow cluster
hosts: all
gather_facts: true
vars_files:
- group_vars/all.yml
- group_vars/all/vault.yml
pre_tasks:
- name: Announce fast deploy mode if enabled
debug:
msg: "🚀 FAST DEPLOY MODE ENABLED: Skipping Docker image builds and pulls. 🚀"
when: fast_deploy | default(false)
run_once: true
tasks:
- name: Ensure python3-docker is installed
ansible.builtin.apt:
name: python3-docker
state: present
update_cache: yes
become: yes
- name: Ensure shared Docker network exists
community.docker.docker_network:
name: airflow_proxynet
driver: bridge
- name: Deploy master
import_playbook: playbook-master.yml
when: inventory_hostname in groups['airflow_master']
- name: Deploy workers
import_playbook: playbook-worker.yml
when: inventory_hostname in groups['airflow_workers']