Puppet Class: profile::docker::prune_old_images
- Defined in:
- modules/profile/manifests/docker/prune_old_images.pp
Summary
Alternative to profile::docker::prune. Prunes only old imagesOverview
SPDX-License-Identifier: Apache-2.0
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'modules/profile/manifests/docker/prune_old_images.pp', line 8
class profile::docker::prune_old_images(
Wmflib::Ensure $ensure = lookup('docker::prune_old_images::ensure', { default_value => 'present' }),
Integer[1] $older_than = lookup('docker::prune_old_images::older_than', { default_value => 14 }),
) {
systemd::timer::job { 'docker-image-prune-old':
ensure => $ensure,
description => 'Prune old Docker images',
user => 'root',
command => "/usr/bin/docker image prune --all --force --filter until=${$older_than * 24}h",
interval => {
'start' => 'OnCalendar',
'interval' => '*-*-* 1:00 UTC',
},
}
}
|