Skip to content

Commit

Permalink
Simplify database preparation task
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Yorkley committed Aug 20, 2023
1 parent bc7bdfa commit b053c8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
7 changes: 6 additions & 1 deletion roles/deploy/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@
tags: rake

- name: prepare database for the first time
include_tasks: prepare_database.yml
command: bash -lc "bundle exec rails db:setup RAILS_ENV={{ rails_env }} I_AM_SURE=1"
args:
chdir: "{{ build_path }}"
when: table_exists.stdout.find('0 rows') != -1
tags:
- rake
- skip_ansible_lint

- name: clear transient data
command: bash -lc "bundle exec rake ofn:data:remove_transient_data RAILS_ENV={{ rails_env }}"
Expand Down
28 changes: 0 additions & 28 deletions roles/deploy/tasks/prepare_database.yml

This file was deleted.

0 comments on commit b053c8c

Please sign in to comment.