From 7e979e4050f2a8290858f9f3f68cdd92d72ddfed Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Tue, 8 Jul 2014 15:32:17 +0200 Subject: [PATCH] Add a new cgit/clean_lock_cron role This will be needed to migrate Dist Git from puppet to ansible. --- roles/cgit/clean_lock_cron/files/clean-lock.cron | 2 ++ roles/cgit/clean_lock_cron/tasks/main.yml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 roles/cgit/clean_lock_cron/files/clean-lock.cron create mode 100644 roles/cgit/clean_lock_cron/tasks/main.yml diff --git a/roles/cgit/clean_lock_cron/files/clean-lock.cron b/roles/cgit/clean_lock_cron/files/clean-lock.cron new file mode 100644 index 0000000000..050218cee7 --- /dev/null +++ b/roles/cgit/clean_lock_cron/files/clean-lock.cron @@ -0,0 +1,2 @@ +*/15 * * * * root find /var/cache/cgit/ -cmin +60 -name '*.lock' -type f -delete -maxdepth 1 + diff --git a/roles/cgit/clean_lock_cron/tasks/main.yml b/roles/cgit/clean_lock_cron/tasks/main.yml new file mode 100644 index 0000000000..be680c416d --- /dev/null +++ b/roles/cgit/clean_lock_cron/tasks/main.yml @@ -0,0 +1,5 @@ +--- +# tasklist for setting up the Cron job cleaning CGit locks + +- name: install the cron file + copy: src=clean-lock.cron dest=/etc/cron.d/cgit-clean-lock.cron mode=0644