yt-dlp-dags/ansible/playbooks/resume_worker.yml
2025-09-17 13:06:37 +03:00

14 lines
619 B
YAML

---
- hosts: airflow_workers
gather_facts: yes
vars_files:
- ../group_vars/all.yml
tasks:
- name: "Archive lock file to resume worker"
command: >
mv {{ airflow_worker_dir }}/AIRFLOW.PREVENT_URL_PULL.lock
{{ airflow_worker_dir }}/AIRFLOW.PREVENT_URL_PULL.lock.removed-{{ ansible_date_time.year }}{{ '%02d' | format(ansible_date_time.month) }}{{ '%02d' | format(ansible_date_time.day) }}-{{ '%02d' | format(ansible_date_time.hour) }}{{ '%02d' | format(ansible_date_time.minute) }}
args:
removes: "{{ airflow_worker_dir }}/AIRFLOW.PREVENT_URL_PULL.lock"
become: yes