From c89c8d2e04861008ac8f502dbe226d8997c9dfb4 Mon Sep 17 00:00:00 2001 From: Maciej Pilarczyk Date: Wed, 26 Jul 2023 12:55:44 +0200 Subject: [PATCH] Add migration scripts --- defaults/main.yaml | 3 ++- tasks/deploy.yaml | 3 --- tasks/main.yaml | 4 ++++ tasks/migrate.yaml | 5 +++++ 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 tasks/migrate.yaml diff --git a/defaults/main.yaml b/defaults/main.yaml index efa7eaf..dc35369 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -4,6 +4,7 @@ service_user: adshares setup: false deploy: false +migrate: false server_domain: localhost server_name: "Adshares AdServer" @@ -21,4 +22,4 @@ vendor_dir: /opt/adshares log_dir: /var/log/adshares repo_version: master -clean_after_days: 7 \ No newline at end of file +clean_after_days: 7 diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml index 935f88c..7a8005e 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yaml @@ -19,9 +19,6 @@ - name: "{{ service_name }} | deploy | Update service" include_tasks: deploy/update.yaml -#- name: "{{ service_name }} | deploy | Migrate service" -# include_tasks: deploy/migrate.yaml - - name: "{{ service_name }} | deploy | Build service" include_tasks: deploy/build.yaml diff --git a/tasks/main.yaml b/tasks/main.yaml index 9e22756..410bd09 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -9,3 +9,7 @@ - name: "{{ service_name }} | Deploy service" include_tasks: deploy.yaml when: deploy + +- name: "{{ service_name }} | Migrate service" + include_tasks: migrate.yaml + when: migrate diff --git a/tasks/migrate.yaml b/tasks/migrate.yaml new file mode 100644 index 0000000..3d6044c --- /dev/null +++ b/tasks/migrate.yaml @@ -0,0 +1,5 @@ +- name: "{{ service_name }} | migrate | Update cron" + include_tasks: setup/cron.yaml + +- name: "{{ service_name }} | migrate | Update supervisor" + include_tasks: setup/supervisor.yaml