From 26c1138139e845708edd9387c90d059247956763 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 2 Nov 2020 01:20:24 +0000 Subject: [PATCH] Remove command to get a database from the server --- .ddev/commands/host/pull-from-prod | 10 ---------- tools/ansible/download-database.yml | 31 ----------------------------- 2 files changed, 41 deletions(-) delete mode 100755 .ddev/commands/host/pull-from-prod delete mode 100644 tools/ansible/download-database.yml diff --git a/.ddev/commands/host/pull-from-prod b/.ddev/commands/host/pull-from-prod deleted file mode 100755 index 98fc5df..0000000 --- a/.ddev/commands/host/pull-from-prod +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -main() { - cd tools/ansible - ansible-playbook download-database.yml - ddev import-db --src ../../dump.sql.gz - rm ../../dump.sql.gz -} - -main diff --git a/tools/ansible/download-database.yml b/tools/ansible/download-database.yml deleted file mode 100644 index 9173a6d..0000000 --- a/tools/ansible/download-database.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: Download a database - - hosts: all - - vars_files: - - vars/vars.yml - - vars: - export_filename: /tmp/dump.sql - - tasks: - - name: Export the database - command: - cmd: > - ../vendor/bin/drush sql-dump - --gzip - --result-file={{ export_filename }} - chdir: "{{ project_root_path }}/{{ ansistrano_current_dir }}/{{ project_web_dir }}" - creates: "{{ export_filename }}" - - - name: Fetch the database from the server - fetch: - src: "{{ export_filename }}.gz" - dest: "{{ playbook_dir }}/../../" - flat: true - - - name: Remove the export from the server - file: - path: "{{ export_filename }}.gz" - state: absent