Browse Source

Add rkt gc task (#2945)

pull/2858/merge
Matthew Mosesohn 6 years ago
committed by GitHub
parent
commit
a36e3fbec3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions
  1. 2
      roles/rkt/files/rkt-gc.sh
  2. 10
      roles/rkt/tasks/main.yml

2
roles/rkt/files/rkt-gc.sh

@ -0,0 +1,2 @@
#!/bin/bash
rkt gc

10
roles/rkt/tasks/main.yml

@ -1,5 +1,13 @@
---
- name: Install rkt
import_tasks: install.yml
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- name: Set up cron job to do garbage cleanup
copy:
src: rkt-gc.sh
dest: /etc/cron.hourly/rkt-gc.sh
owner: root
group: root
mode: 0750
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
Loading…
Cancel
Save