From 0d1f35a165190ea088d9393590918018c23d6a5a Mon Sep 17 00:00:00 2001 From: Toby Batch Date: Wed, 25 Jan 2017 10:53:44 +0000 Subject: [PATCH] Added a wrapper for the ansible site cleaner --- drupal-clean-site | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 drupal-clean-site diff --git a/drupal-clean-site b/drupal-clean-site new file mode 100755 index 0000000..44afe85 --- /dev/null +++ b/drupal-clean-site @@ -0,0 +1,10 @@ +#!/bin/bash + +for x in $(find /var/www/html/?? -maxdepth 1 -type d -mtime +30); do + /usr/bin/ansible-playbook \ + -i "/var/lib/jenkins/jobs/_ntdr-pas/workspace/inventory/intranet" \ + --vault-password-file ~/.vault_pass.txt \ + --limit=jenkins \ + --extra-vars="local=${x} archive=/var/tmp/old-builds/$(basename $x).tgz" \ + /var/lib/jenkins/jobs/_ntdr-pas/workspace/clean-drupal.yml +done