diff options
Diffstat (limited to 'ansible/roles/sz-ds/tasks/sz-ds-app.yml')
-rw-r--r-- | ansible/roles/sz-ds/tasks/sz-ds-app.yml | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ansible/roles/sz-ds/tasks/sz-ds-app.yml b/ansible/roles/sz-ds/tasks/sz-ds-app.yml index d89ade3..9bd13af 100644 --- a/ansible/roles/sz-ds/tasks/sz-ds-app.yml +++ b/ansible/roles/sz-ds/tasks/sz-ds-app.yml @@ -7,15 +7,19 @@ notify: - restart sz-ds - name: /etc/systemd/system/sz-ds.service + notify: + - flyway migrate + - restart sz-ds copy: src: etc/systemd/system/sz-ds.service dest: /etc/systemd/system/sz-ds.service + - name: git pull tags: sz-ds-pull notify: - flyway migrate - restart sz-ds - register: git_checkout + register: git_pull git: repo: "https://{{ sz_ds_secrets.github.username }}:{{ sz_ds_secrets.github.password }}@github.com/SweetzpotAS/SweetzpotCentral" dest: /opt/sz-ds/src/SweetzpotCentral @@ -23,10 +27,11 @@ - name: Update GIT_REVISION tags: sz-ds-pull - lineinfile: - path: "/etc/sz-ds/env.conf" - regexp: "^GIT_REVISION=" - line: "GIT_REVISION={{ git_checkout.after }}" + copy: + dest: "/etc/sz-ds/env-git.conf" + content: | + GIT_REVISION={{ git_pull.after }} +- debug: msg=GIT_REVISION={{ git_pull.after }} - name: sz-ds pip notify: restart sz-ds |