diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-28 15:37:55 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2018-08-28 15:37:55 +0200 |
commit | a5705d3f44cb86b216277c6311f313963d4f9c49 (patch) | |
tree | b9a6343a8c730b83e37138bb09461b5a4cf007bc /ansible/roles/sz-ds/tasks/flyway.yml | |
parent | 1f677dfeded1f52dc75c34c93f9ef1d6b3b948be (diff) | |
download | infra-a5705d3f44cb86b216277c6311f313963d4f9c49.tar.gz infra-a5705d3f44cb86b216277c6311f313963d4f9c49.tar.bz2 infra-a5705d3f44cb86b216277c6311f313963d4f9c49.tar.xz infra-a5705d3f44cb86b216277c6311f313963d4f9c49.zip |
o sz-ds: wip.
Diffstat (limited to 'ansible/roles/sz-ds/tasks/flyway.yml')
-rw-r--r-- | ansible/roles/sz-ds/tasks/flyway.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ansible/roles/sz-ds/tasks/flyway.yml b/ansible/roles/sz-ds/tasks/flyway.yml new file mode 100644 index 0000000..c34ef44 --- /dev/null +++ b/ansible/roles/sz-ds/tasks/flyway.yml @@ -0,0 +1,30 @@ +- name: mkdir /opt/sz-ds/flyway + file: + state: directory + path: /opt/sz-ds/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: + dest: /etc/sz-ds/flyway.conf + content: | + flyway.url=jdbc:postgresql://localhost/sz-ds + flyway.user=sz-ds-flyway + flyway.password={{ sz_ds_secret.db_password_flyway }} + + 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: + path: "/opt/sz-ds/flyway/flyway-{{ flyway_version }}/flyway" + mode: a=rx |