You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
585 B

{% from 'common.jinja2' import app_dir, bin_dir %}
initialize-db:
cmd.run:
- name: {{ bin_dir }}/python -c "from scripts.initialize_db import initialize_db; initialize_db('{{ app_dir }}/{{ pillar['ini_file'] }}')"
- cwd: {{ app_dir }}
- onchanges:
- postgres_database: tildes
{% if grains['id'] == 'dev' %}
insert-dev-data:
cmd.run:
- name: {{ bin_dir }}/python -c "from scripts.initialize_db import insert_dev_data; insert_dev_data('{{ app_dir }}/{{ pillar['ini_file'] }}')"
- cwd: {{ app_dir }}
- onchanges:
- cmd: initialize-db
{% endif %}