In uw config.yml
bestand, kunt u de onderstaande 2 taken opnieuw ordenen (Airflow | Config | Initialize Airflow Database
&Airflow | Config | Copy basic airflow config file
) naar
Airflow | Config | Copy basic airflow config file
Airflow | Config | Initialize Airflow Database
Kortom, uw airflow.cfg.j2
bestand moet metadata databaseverbindingsreeks zoals deze bevatten sql_alchemy_conn = my_conn_string
in [core]
sectie zoals vermeld in https://airflow.apache.org /howto/set-config.html#setting-configuration-options
(Controleer het nogmaals)
Zodra uw configuratiebestand is gekopieerd en initdb
wordt uitgevoerd, creëert het alle benodigde tabellen die nodig zijn voor de luchtstroom.
- name: Airflow | Config | Initialize Airflow Database
shell: "{{ airflow_executable }} initdb"
args:
chdir: "{{ airflow_home }}"
executable: /bin/bash
become: yes
become_method: sudo
become_user: "{{ airflow_user }}"
- name: Airflow | Config | Copy basic airflow config file
template:
src: airflow.cfg.j2
dest: "{{ airflow_home }}/airflow/airflow.cfg"
owner: "{{ airflow_user }}"
group: "{{ airflow_group }}"
mode: 0640
register: airflow_config
notify:
- restart airflow-webserver
- restart airflow-scheduler
- restart airflow-worker