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