os-cluster: add cronjob to delete old images from nodes
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
ef97abfc0c
commit
d55060d205
1 changed files with 15 additions and 0 deletions
|
@ -248,3 +248,18 @@
|
|||
- name: Enable wildcard routes
|
||||
command: oc -n default set env dc/router ROUTER_ALLOW_WILDCARD_ROUTES=true
|
||||
changed_when: false
|
||||
|
||||
|
||||
- name: Add a cleanup cron job to the nodes
|
||||
hosts: os_nodes_stg:os_nodes
|
||||
tags:
|
||||
- os-node-cleanup
|
||||
tasks:
|
||||
- name: Ensure a job that runs every Mondays to clean old docker images from the nodes.
|
||||
cron:
|
||||
name: "remove docker dangling images"
|
||||
weekday: "1"
|
||||
minute: "0"
|
||||
hour: "0"
|
||||
job: "docker rmi $(docker images --filter dangling=true -q)"
|
||||
state: present
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue