Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d2d43f

Browse files
committed
NEW: implemented local backup filebucket cleanup
1 parent 9982787 commit 8d2d43f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
55

66
## (next)
77
- NEW: allow borrowing insufficient memory from swap for distribution
8+
- NEW: implemented local backup filebucket cleanup
89

910
## 1.3.0 (2019-04-14)
1011
- FIXED: forced secrets to override persistent values

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ cfnetwork::client_ports:
161161
* `$key_server = 'hkp://pgp.mit.edu:80'` - default PGP key server
162162
* `$random_feed = true` - enable random entropy generating daemon
163163
* `$add_handy_tools = true` - install additional tools
164+
* `$puppet_backup_age = '1d'` - how long to keep local puppet filebucket backups
164165

165166
## `cfsystem::bindir` type
166167

manifests/init.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767
Boolean $random_feed = true,
6868
Boolean $add_handy_tools = true,
69+
70+
String[1] $puppet_backup_age = '1d',
6971
) inherits cfsystem::defaults {
7072
include cfnetwork
7173
include cfauth
@@ -203,6 +205,14 @@
203205
}
204206
}
205207

208+
# Cleanup local backups
209+
tidy { '/opt/puppetlabs/puppet/cache/clientbucket/':
210+
age => $puppet_backup_age,
211+
recurse => true,
212+
rmdirs => true,
213+
backup => false,
214+
}
215+
206216
#---
207217
exec { 'cfsystem-systemd-reload':
208218
command => '/bin/systemctl daemon-reload',

0 commit comments

Comments
 (0)