Peter Berghold
2011-Jan-21 17:05 UTC
[Puppet Users] What the??? Failing dependancies and not sure why...
Observe the following code sniget: user { nagios : comment => "Nagios Host Monitoring Service", shell => "/bin/bash", home => "/home/nagios", ensure => present } file { nagios-homedir : path => "/home/nagios", owner => "nagios", group=>"nagios" , mode => 0700, ensure => directory } file { nagios-ssh-dir : path => "/home/nagios/.ssh", owner => "nagios", group=>"nagios", mode =>0700, ensure => directory } file { nagios-ssh-key : path => "/home/nagios/.ssh/authorized_keys", owner => "nagios", group => "nagios", mode => 0600, source => "puppet://puppet/ssh-keys/nagios/authorized_keys" } File [nagios-ssh-key] -> File[nagios-ssh-dir] -> File[nagios-homedir] Unless I''m missing something here, what should be happening is /home/nagios gets created first, then /home/nagios/.ssh and lastly the authorized key gets brought in via puppet from the repository... But wait... I''m getting an error instead: rr: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-key]/ensure: change from absent to file failed: Could not set ''file on ensure: No such file or directory - /home/nagios/.ssh/authorized_keys.puppettmp_8552 at /etc/puppet/manifests/classes/nrpe.pp:35 notice: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-dir]: Dependency File[nagios-ssh-key] has failures: true warning: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-dir]: Skipping because of failed dependencies notice: /Stage[preamble]/Debian-nrpe/File[nagios-homedir]: Dependency File[nagios-ssh-key] has failures: true warning: /Stage[preamble]/Debian-nrpe/File[nagios-homedir]: Skipping because of failed dependencies notice: /Whit[default]: Dependency File[nagios-ssh-key] has failures: true warning: /Whit[default]: Skipping because of failed dependencies notice: /Whit[postamble]: Dependency File[nagios-ssh-key] has failures: true warning: /Whit[postamble]: Skipping because of failed dependencies notice: Finished catalog run in 2.63 seconds OK... so what am I missing? -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Naresh V
2011-Jan-21 17:14 UTC
Re: [Puppet Users] What the??? Failing dependancies and not sure why...
On 21 January 2011 22:35, Peter Berghold <salty.cowdawg@gmail.com> wrote:> Observe the following code sniget:[...]> file { > nagios-ssh-key : > path => "/home/nagios/.ssh/authorized_keys", > owner => "nagios", group => "nagios", mode => 0600, > source => "puppet://puppet/ssh-keys/nagios/authorized_keys" > }[...]> > OK... so what am I missing?Hello Peter, I think you intended puppet:/// instead of puppet:// "All puppet file server URIs are structured as follows: puppet://{server hostname (optional)}/{mount point}/{remainder of path} If a server hostname is omitted (i.e. puppet:///{mount point}/{path}; note the triple-slash), the URI will resolve to whichever server the evaluating node considers to be its master." http://docs.puppetlabs.com/guides/file_serving.html -Naresh. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Berghold
2011-Jan-21 17:47 UTC
Re: [Puppet Users] What the??? Failing dependancies and not sure why...
But that is not what the complaint is. puppet://puppet/... resolves to the same thing as puppet://... in my setup. (Each subnet on my network has a DNS entry for "puppet" pointing to the correct master for that subnet) On Fri, Jan 21, 2011 at 12:14 PM, Naresh V <nareshov@gmail.com> wrote:> On 21 January 2011 22:35, Peter Berghold <salty.cowdawg@gmail.com> wrote: > > Observe the following code sniget: > [...] > > file { > > nagios-ssh-key : > > path => "/home/nagios/.ssh/authorized_keys", > > owner => "nagios", group => "nagios", mode => 0600, > > source => "puppet://puppet/ssh-keys/nagios/authorized_keys" > > } > [...] > > > > OK... so what am I missing? > > Hello Peter, > > I think you intended puppet:/// instead of puppet:// > > > "All puppet file server URIs are structured as follows: > > puppet://{server hostname (optional)}/{mount point}/{remainder of path} > If a server hostname is omitted (i.e. puppet:///{mount point}/{path}; > note the triple-slash), the URI will resolve to whichever server the > evaluating node considers to be its master." > > http://docs.puppetlabs.com/guides/file_serving.html > > > -Naresh. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Berghold
2011-Jan-21 17:51 UTC
Re: [Puppet Users] What the??? Failing dependancies and not sure why...
OK... I had the relationship diagram backwards... (slapping self) Instead of key -> directory -> home I should have had home->directory->key Re-reading helps sometimes. -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nan Liu
2011-Jan-21 18:14 UTC
Re: [Puppet Users] What the??? Failing dependancies and not sure why...
On Fri, Jan 21, 2011 at 9:51 AM, Peter Berghold <salty.cowdawg@gmail.com> wrote:> OK... > > I had the relationship diagram backwards... (slapping self) > > Instead of key -> directory -> home I should have had home->directory->keyFor files puppet will build an implicit dependency. You don''t need to specify the relationship. Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Umair Ghani
2011-Jan-22 23:42 UTC
Re: [Puppet Users] What the??? Failing dependancies and not sure why...
Try using require user { nagios : comment => "Nagios Host Monitoring Service", shell => "/bin/bash", home => "/home/nagios", ensure => present } file { nagios-homedir : require => User[''nagios"], path => "/home/nagios", owner => "nagios", group=>"nagios" , mode => 0700, ensure => directory nagios-ssh-dir : require => File["nagios-homedir"], path => "/home/nagios/.ssh", owner => "nagios", group=>"nagios", mode =>0700, ensure => directory nagios-ssh-key : require => File["nagios-ssh-dir"], path => "/home/nagios/.ssh/authorized_keys", owner => "nagios", group => "nagios", mode => 0600, source => "puppet://puppet/ssh-keys/nagios/authorized_keys"} On Fri, Jan 21, 2011 at 11:05 AM, Peter Berghold <salty.cowdawg@gmail.com>wrote:> Observe the following code sniget: > > user { > nagios : > comment => "Nagios Host Monitoring Service", > shell => "/bin/bash", > home => "/home/nagios", > ensure => present > } > file { > nagios-homedir : > path => "/home/nagios", > owner => "nagios", group=>"nagios" , mode => 0700, > ensure => directory > } > > file { > nagios-ssh-dir : > path => "/home/nagios/.ssh", > owner => "nagios", group=>"nagios", mode =>0700, > ensure => directory > } > > > > file { > nagios-ssh-key : > path => "/home/nagios/.ssh/authorized_keys", > owner => "nagios", group => "nagios", mode => 0600, > source => "puppet://puppet/ssh-keys/nagios/authorized_keys" > } > File [nagios-ssh-key] -> File[nagios-ssh-dir] -> File[nagios-homedir] > > Unless I''m missing something here, what should be happening is /home/nagios > gets created first, then /home/nagios/.ssh and lastly the authorized key > gets brought in via puppet from the repository... > > But wait... I''m getting an error instead: > > > rr: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-key]/ensure: change from > absent to file failed: Could not set ''file on ensure: No such file or > directory - /home/nagios/.ssh/authorized_keys.puppettmp_8552 at > /etc/puppet/manifests/classes/nrpe.pp:35 > notice: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-dir]: Dependency > File[nagios-ssh-key] has failures: true > warning: /Stage[preamble]/Debian-nrpe/File[nagios-ssh-dir]: Skipping > because of failed dependencies > notice: /Stage[preamble]/Debian-nrpe/File[nagios-homedir]: Dependency > File[nagios-ssh-key] has failures: true > warning: /Stage[preamble]/Debian-nrpe/File[nagios-homedir]: Skipping > because of failed dependencies > notice: /Whit[default]: Dependency File[nagios-ssh-key] has failures: true > warning: /Whit[default]: Skipping because of failed dependencies > notice: /Whit[postamble]: Dependency File[nagios-ssh-key] has failures: > true > warning: /Whit[postamble]: Skipping because of failed dependencies > notice: Finished catalog run in 2.63 seconds > > > OK... so what am I missing? > > > > -- > Peter L. Berghold > Owner, Shark River Technical Solutions LLC > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.