[Puppet Users] tidy: Could not back up files of type socket

2013-10-16 Thread Derek Dresser
Hello,

I am using puppet tidy to clean up my /tmp directory
as described here:
https://groups.google.com/d/msg/puppet-users/bg6GzDVDR-k/ELj8eeGI2F8J

tidyup:
  /tmp:
 age: '4w'
 backup: 'false'
 recurse: 'true'

Puppet throws errors when it encounters a socket instead of a regular file 
or directory.

change from socket to absent failed: Could not back up files of type socket

I see some old discussions regarding this, but I haven't found a clear 
solution.  I don't want to back up the sockets and have specified 'false' 
as you can see above.  What is the best way to deal with the sockets and 
eliminate these errors?

Thanks in advance,
Derek

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] specifying tidy resources in hiera (solved)

2013-10-11 Thread Derek Dresser
Hello,

I was looking for a clean way to specify tidy resources in my hiera 
hierarchy.  Basically, I wanted to be able to specify common tidy 
resources, or tidy resources specific to a host without editing a module or 
class each time, essentially separating the data from the logic.  Here I'm 
using this for tidy, but the same model could be used for other resources.

I came up with a solution using create_resources that works so I thought 
I'd share.

assuming the two following yaml files.

 common.yaml ###
---
tidyup:
  /tmp:
 age: '4w'
 backup: 'false'
 recurse: 'true'

 myhost.yaml #
---
classes : [ 'tidyup' ]

tidyup:
  /tmp/dir1:
 age: '1s'
 backup: 'false'
 recurse: 'true'
  /tmp/dir3:
 age: '1s'
 backup: 'false'
 recurse: 'true'

I created a module named 'tidyup' that contains one class.

class tidyup {
$tidydirs = hiera_hash('tidyup', [])
create_resources('tidy',$tidydirs)
}

This class gathers up the tidyup resources defined at all levels of the 
hierarchy and performs the specified tidy tasks.  You can see what is 
returned by running 'hiera' on the command line.
hiera -h tidyup hostname=myhost

result:
{/tmp/dir3={age=1s, backup=false, recurse=true}, 
/tmp/dir1={age=1s, backup=false, recurse=true}, 
/tmp={age=4w, backup=false, recurse=true}}





-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.