aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/sz-ds/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/sz-ds/tasks')
-rw-r--r--ansible/roles/sz-ds/tasks/flyway.yml11
-rw-r--r--ansible/roles/sz-ds/tasks/sz-ds-app.yml4
2 files changed, 6 insertions, 9 deletions
diff --git a/ansible/roles/sz-ds/tasks/flyway.yml b/ansible/roles/sz-ds/tasks/flyway.yml
index c34ef44..d3c8922 100644
--- a/ansible/roles/sz-ds/tasks/flyway.yml
+++ b/ansible/roles/sz-ds/tasks/flyway.yml
@@ -2,14 +2,13 @@
file:
state: directory
path: /opt/sz-ds/flyway
-- template:
+- name: /opt/sz-ds/bin/flyway
+ template:
src: opt/sz-ds/bin/flyway.j2
dest: /opt/sz-ds/bin/flyway
- become: no
-# mode: a=rx
- name: /etc/sz-ds/flyway.conf
tags: update-password
- file:
+ copy:
dest: /etc/sz-ds/flyway.conf
content: |
flyway.url=jdbc:postgresql://localhost/sz-ds
@@ -18,13 +17,13 @@
flyway.locations=filesystem:/opt/sz-ds/src/SweetzpotCentral/data-server/migrations
flyway.schemas=public
-
- name: Download and extract Flyway {{ flyway_version }}
unarchive:
src: "https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/{{ flyway_version }}/flyway-commandline-{{ flyway_version }}.zip"
dest: /opt/sz-ds/flyway
creates: "/opt/sz-ds/flyway/flyway-{{ flyway_version }}"
remote_src: yes
-- file:
+- name: chmod +x flyway
+ file:
path: "/opt/sz-ds/flyway/flyway-{{ flyway_version }}/flyway"
mode: a=rx
diff --git a/ansible/roles/sz-ds/tasks/sz-ds-app.yml b/ansible/roles/sz-ds/tasks/sz-ds-app.yml
index 78e300c..d89ade3 100644
--- a/ansible/roles/sz-ds/tasks/sz-ds-app.yml
+++ b/ansible/roles/sz-ds/tasks/sz-ds-app.yml
@@ -13,7 +13,7 @@
- name: git pull
tags: sz-ds-pull
notify:
-# - flyway migrate
+ - flyway migrate
- restart sz-ds
register: git_checkout
git:
@@ -36,6 +36,4 @@
virtualenv_python: python3
chdir: /opt/sz-ds/src/SweetzpotCentral/data-server
requirements: requirements.txt
-# editable: true
extra_args: --trusted-host github.com --process-dependency-links
-