Skip to content

Commit

Permalink
adding run once to the database setup tasks for cluster env
Browse files Browse the repository at this point in the history
  • Loading branch information
cmharlow committed Apr 25, 2019
1 parent 943f783 commit 5e80ae7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ deploy:
- $TRAVIS_TAG.tar.gz
- $TRAVIS_TAG.zip
api_key:
secure: OYjEWU8XXIjqeaW/FgWKH+kEwXt5y0y1Ta3W/eWxKCK2f1G2W2rNKCuRUtzSXQbLbmIHImUgEMlm1VvB84JB2PqVE/EAOtojxFN21exNSdGlP4hihovjoWMAvnfo5SVNdBTZ6I3VoKlaeC6WpO71bZrMLyKUSPjU2Ni3JtMOCtJlGhaz89j6izMQAe2gFzPG5OoyyQrR7f/cVAQsbu9I2jEaOomsvf6yP6UvUXbVXcTUiCZkcngH1RHMVHuOSYttnYbZsawhVk2BAvQT1eZO/LQVo+j5ulcrlz4xDMyjvphjOw/0yqf7Rjk/rZn5avOcBpMyecDEkykRQHoJSnI7VES0cm0leWEFzcuGNU5KfR2m7HjjCDOTHYrlf8UKqrOISHqQoT4AFmUGEPut/GtW2RsTtrKxsj1VgTYiD/+eZXkSIU0eyR7Mhew5BEehvSWjVbrN0ZFOYxgAAZujixohOy7BG3vFSNn+A7/+QtCxiCqUyle/GrNbVw5fxpjtXRJaef4rubbuoMbYt1+BOrbnB+f1dzU8daZPvcGp/264kuEMtD69QkxtVdsypkXdRp1yTVZgY4l+psRnv4tEeG3T+pjIngbuWQMDP7tthguvsdtOrCvlLLwPt2pgcwexU58PINSEA9SLCEKk614wmsG9Y29zg8IZ+2piRxf58dZ5HnQ=
secure: QBfV53ur+n61pruhD30PD8CCp3R+M5fnl8+7J2vy7tzyspvtRMs3x9nJTihHAZ0Y4qjZ+fvQ2RsW80hONlMi+DaY+vrEqhhjZ4YHicaJV/tWzGAq4R6YjcA98OpW94R7i1LSMBh0+ncXzzLZnQeR/NzB7co1gkIXV5tKXZLQsL11Oz7cuJGGrFVdfhTXDgl+zTigno6nvyXHpSqDAoZ3p16wyp7vYtJicEkWa+YwsdYCnwuLjOg8jwrOvsUopH1UOnqRv5tOaFM01uXUIJqNU/Uy3AaaH7nD9J4pYhe9tHSSeITnsdiTa53IFVZrcVwrvZYftp9mGjCKQiZohDHvOJbQbSv2AojTRPeEYfum14+0kBYQmiRRVh5L2geEddXA7kU9waSF1GO9YvCJrEtDIfLTioxJXUxD0i5u2pq+ZJ0JV7D9WLdq54dR28tHZYXwOxe2WnwhCaax/WivFoYvtIL1FXybJcEF9d9tZCLgNUbABaLSfBrVQQ55Tx0mKqHQOccy3+E5t9PLVG6CFK2b9n5iogrnkOaz49/2cmVHYqiQwp1KYzYvCs7At9sTMv0+jlblVEikKuLSwpiyMszWpcAk8g8T236FwXxrBEHXnfuDjmrHxjK9HX91C16gTjeyu68T4XVVUbYTNsWLNEsJEnmIXrmhuy+EHoayIWrkk3w=
on:
repo: tulibraries/ansible-role-airflow
tags: true
Expand Down
1 change: 1 addition & 0 deletions tasks/manage_airflow_variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
{{ airflow_virtualenv }}/bin/airflow variables --set {{ item.key }} {{ item.value }}
changed_when: false
no_log: True
failed_when: false
with_items: "{{ airflow_variables }}"
2 changes: 2 additions & 0 deletions tasks/manage_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
become_user: "{{ airflow_user_name }}"
become: true
command: "{{ airflow_virtualenv }}/bin/airflow initdb"
run_once: true
when:
- "not airflow_config_stat.stat.exists"
- "airflow_do_init_db | bool"
Expand All @@ -86,6 +87,7 @@
become_user: "{{ airflow_user_name }}"
become: true
command: "{{ airflow_virtualenv }}/bin/airflow upgradedb"
run_once: true
when:
- "airflow_config_stat.stat.exists"
- "airflow_do_upgrade_db | bool"
Expand Down

0 comments on commit 5e80ae7

Please sign in to comment.