Ask Your Question
0

tidy to delete report yaml files not works

asked 2016-05-10 08:52:15 -0600

jarek04 gravatar image

I try deletet old file from /opt/puppetlabs/server/data/puppetserver/reports/

I try

tidy { '/opt/puppetlabs/server/data/puppetserver/reports/':
        age     => '30d',
        matches => "*.yaml",
        recurse => true,
        rmdirs  => false,
        type    => ctime,
}

But not work

 /opt/puppetlabs/bin/puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for puppet.centerkom.pl
Notice: /Stage[main]/Puppet_master::Clean/Tidy[/opt/puppetlabs/server/data/puppetserver/reports]: Tidying 0 files
Info: Applying configuration version '1462888179'
Notice: /Stage[main]/Base/Exec[update-apt-schedule]/returns: executed successfully
Notice: Applied catalog in 7.87 seconds

List of files

root@puppet:/opt/puppetlabs/server/data/puppetserver/reports# ls -lR
-rw-r----- 1 puppet puppet 123945 Sep 18  2015 201509180843.yaml
-rw-r----- 1 puppet puppet 123893 Sep 18  2015 201509180848.yaml
-rw-r----- 1 puppet puppet 122869 Sep 18  2015 201509180918.yaml
-rw-r----- 1 puppet puppet 123679 Sep 18  2015 201509180948.yaml
-rw-r----- 1 puppet puppet 122888 Sep 18  2015 201509181018.yaml
-rw-r----- 1 puppet puppet 123691 Sep 18  2015 201509181048.yaml
-rw-r----- 1 puppet puppet 122901 Sep 18  2015 201509181118.yaml
-rw-r----- 1 puppet puppet 122866 Sep 18  2015 201509181148.yaml
-rw-r----- 1 puppet puppet 123679 Sep 18  2015 201509181218.yaml
-rw-r----- 1 puppet puppet 122890 Sep 18  2015 201509181248.yaml
-rw-r----- 1 puppet puppet 123694 Sep 18  2015 201509181318.yaml
-rw-r----- 1 puppet puppet 122858 Sep 18  2015 201509181348.yaml
-rw-r----- 1 puppet puppet 123683 Sep 18  2015 201509181418.yaml
-rw-r----- 1 puppet puppet 122888 Sep 18  2015 201509181448.yaml
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-10 10:09:07 -0600

try and set recurse to true - its odd to explain but for a top level dir if recurse is false it doesnt look beneath that dir!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-05-10 08:52:15 -0600

Seen: 294 times

Last updated: May 10 '16