From 066000e23b28a5a2147316b6cce291b4e5b1da0b Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Mon, 7 Nov 2016 20:26:17 +0000 Subject: [PATCH] add osbs old build cleanup for openshift cluster Signed-off-by: Adam Miller --- files/osbs/cleanup-old-osbs-builds | 4 ++++ playbooks/groups/osbs-cluster.yml | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 files/osbs/cleanup-old-osbs-builds diff --git a/files/osbs/cleanup-old-osbs-builds b/files/osbs/cleanup-old-osbs-builds new file mode 100644 index 0000000000..27cf132ff4 --- /dev/null +++ b/files/osbs/cleanup-old-osbs-builds @@ -0,0 +1,4 @@ +SHELL=/bin/bash +MAILTO=maxamillion@fedoraproject.org + +0 0 * * * root oadm prune builds --orphans --keep-younger-than=720h0m0s --confirm \ No newline at end of file diff --git a/playbooks/groups/osbs-cluster.yml b/playbooks/groups/osbs-cluster.yml index 80de1a16f9..77d1b553ca 100644 --- a/playbooks/groups/osbs-cluster.yml +++ b/playbooks/groups/osbs-cluster.yml @@ -391,6 +391,12 @@ dest: "{{ koji_ca_cert_path }}" notify: oc secrets new + - name: cron entry to clean up old builds + copy: + src: "{{files}}/osbs/cleanup-old-osbs-builds" + dest: "/etc/cron.d/cleanup-old-osbs-builds" + + - name: post-install osbs tasks hosts: osbs-masters-stg:osbs-nodes-stg tags: