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

  1. {% from 'common.jinja2' import app_dir, bin_dir %}
  2. initialize-db:
  3. cmd.run:
  4. - name: {{ bin_dir }}/python -c "from scripts.initialize_db import initialize_db; initialize_db('{{ app_dir }}/{{ pillar['ini_file'] }}')"
  5. - cwd: {{ app_dir }}
  6. - onchanges:
  7. - postgres_database: tildes
  8. {% if grains['id'] == 'dev' %}
  9. insert-dev-data:
  10. cmd.run:
  11. - name: {{ bin_dir }}/python -c "from scripts.initialize_db import insert_dev_data; insert_dev_data('{{ app_dir }}/{{ pillar['ini_file'] }}')"
  12. - cwd: {{ app_dir }}
  13. - onchanges:
  14. - cmd: initialize-db
  15. {% endif %}