From cac3d73020aebeca9f471d6689c7068e82aecc41 Mon Sep 17 00:00:00 2001
From: Chris Croome <chris@webarchitects.co.uk>
Date: Mon, 29 Jan 2018 14:05:12 +0000
Subject: [PATCH] Drop records from the wp_es_emaillist table on dev

---
 roles/live2dev/tasks/main.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/roles/live2dev/tasks/main.yml b/roles/live2dev/tasks/main.yml
index ea241d8..712164c 100644
--- a/roles/live2dev/tasks/main.yml
+++ b/roles/live2dev/tasks/main.yml
@@ -76,5 +76,18 @@
 - name: Dev database overwritten with live data
   shell: "cat /home/cotech/private/cotech.sql | mysql cotechdev"
 
+- name: All records in the wp_es_emaillist table deleted on dev
+  shell: "wp db query 'DELETE FROM wp_es_emaillist' --allow-root"
+  args:
+    chdir: /home/cotechdev/sites/web
+
+- name: Dev uploads directory in place
+  file:
+    path: /home/cotechdev/sites/web/app/uploads
+    state: directory
+    owner: cotechdev
+    group: cotechdev
+    mode: 0755
+
 - name: Live files rsynced to dev
   command: "rsync -aq --chown=cotechdev:cotechdev --chmod=D2775,F0664 /home/cotech/sites/web/app/uploads/ /home/cotechdev/sites/web/app/uploads/"
-- 
GitLab