Hi,

I have a dependency problem in my configuration. I have thoses 2
objects.

file { "/etc/puppet/files":
...
}

file { "/etc/puppet":
...
require => File["/etc/puppet/files"],
}

I thought I would have no problem with that but /etc/puppet is
autorequired by /etc/puppet/files, which means a dependency cycle. So
my first question is, is there a way to avoid that unwanted
autorequiring?

Let me explain my choice : I first change the owner of /etc/puppet/
files for someone else than root being able to write. Then I commit my
svn configuration into /etc/puppet/files ( I do like that because root
doesn't have the right to checkout, only some users does ), and in the
end I update my puppet configuration ( with the /etc/puppet object )
using the checkouted files. Maybe there's a better way to do it.

Second time : when I saw there was a problem, I tried the dirty way by
commenting the /etc/puppet/files object and creating an exec object
doing just the same.

exec { "Dirty way":
command => "chown svn /etc/puppet/files",
path => "/usr/bin:/usr/sbin",
unless => "ls -la /etc/puppet/files | head -2 | grep grpsvn",
}

Always the same dependency problem because "Dirty way" autorequires /
etc/puppet ( I changed the require in /etc/puppet too ).

The weird thing I realized is that if I change my exec to :
exec { "Dirty way":
command => "chgrp grpsvn /etc/puppet/files",
path => "/usr/bin:/usr/sbin",
unless => "cd /etc; ls -la puppet/files | head -2 | grep grpsvn",
}

then I don't have any more the autorequire and the configuration is
working just fine. Is it normal that puppet parses the unless
parameter ( and maybe others ) to find autorequirements? Isn't it too
much autorequirements?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to