Hello there I''m just testing a module (see merging directories) and it is quite involved, in that it: __generic__ 1) creates a user 2) creates a base directory 3) copies generic files (directory with recursion) 4) generate a configuration file from a template 5) creates a symlink __os specific__ 6) copies os specific files (in my scenario two folders, and an init script) 7) chkconfig''s the init script (this is on RHEL5) 8) starts the daemon. The module is ordered as outlined above, however on testing it i''m getting errors and warnings: - execute homedirectories module, - step 6 from bigbrother (the module in question) - step 4 - step 2... root@puppetslave ~]# puppetd -vt info: Retrieving plugins notice: /File[/var/lib/puppet/lib/puppet]/checksum: checksum changed ''{mtime}Wed Jan 21 10:37:49 +1000 2009'' to ''{mtime}Wed Jan 21 10:37:50 +1000 2009'' notice: /File[/var/lib/puppet/lib/puppet/type]/checksum: checksum changed ''{mtime}Wed Jan 21 10:37:49 +1000 2009'' to ''{mtime}Wed Jan 21 10:43:55 +1000 2009'' info: Caching catalog at /var/lib/puppet/localconfig.yaml notice: Starting catalog run notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ homedirectories/Exec[/bin/tar xzf /tmp/ipswich.tar.gz]/returns: executed successfully err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/File[/var/bb/bbc1.9e-btf_linux/bin]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /var/bb/bbc1.9e-btf_linux/bin.puppettmp at /var/lib/puppet/ modules/bigbrother/manifests/init.pp:79 warning: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/checksum: File /var/bb/bb/etc/bb-hosts does not exist -- cannot checksum notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/checksum: defined ''checksum'' as ''{md5}2eb70f3d3116304bf1991c37f916c95c'' err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/content: change from absent to ## ## Do NOT modify this file directly, it is being controlled by puppet. ## Please contact usg@example.org if your require a change. ## 123.123.123.123 maya.example.org # BBDISPLAY BBPAGER BBNET noconn 123.123.123.132 inca.example.org # BBDISPLAY BBPAGER BBNET noconn 192.168.154.235 puppetslave.example.org # failed: No such file or directory - /var/bb/bb/etc/bb-hosts.puppettmp err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/owner: change from absent to bb failed: Failed to set owner to ''920'': No such file or directory - /var/bb/bb/etc/bb-hosts err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/group: change from absent to bb failed: failed to chgrp /var/bb/bb/etc/bb- hosts to 920: No such file or directory - /var/bb/bb/etc/bb-hosts err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]/mode: change from absent to 664 failed: failed to chmod /var/bb/bb/etc/bb-hosts: No such file or directory - /var/bb/bb/etc/bb-hosts info: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/File[/var/bb/bb/etc/bb-hosts]: Scheduling refresh of Service[bigbrother-client-local] notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/Service[bigbrother-client-local]: Dependency file[/var/bb/bb/etc/bb-hosts] has 4 failures warning: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/Service[bigbrother-client-local]: Skipping because of failed dependencies notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/Bb-hosts[puppet]/Service[bigbrother-client-local]: Triggering ''refresh'' from 1 dependencies err: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/File[/var/bb/bbc1.9e-btf_linux/etc]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /var/bb/bbc1.9e-btf_linux/etc.puppettmp at /var/lib/puppet/ modules/bigbrother/manifests/init.pp:62 notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/File[/var/bb/bbc1.9e-btf_linux/init]/ensure: created notice: //Node[puppetslave.example.org]/defaultnode/shared-default/ bigbrother/File[/var/bb]/ensure: created Is there a way of ensuring the module is processed in order? cheers chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
nevermind i found http://reductivelabs.com/trac/puppet/wiki/TypeReference#available-metaparameters from another post. before and require ... duh sorry to waste people''s time :) chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
That said, it does not appear to honour the require''s i''m using consistently... chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
What does your code look like and what is the behavior? On 1/29/09, chakkerz <chakkerz@gmail.com> wrote:> > That said, it does not appear to honour the require''s i''m using > consistently... > > chakkerz > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello there Andrew I have a feeling i had a spurious control character, because i did a test module: class test { if (skip_test != "true") { file { "/var/baz/": ensure => directory, } file { "/var/baz/foo": path => "/var/baz/foo", source => "puppet:///test/foo", require => file["/var/baz"], } file { "/var/baz/bar": path => "/var/baz/bar", source => "puppet:///test/bar", require => file["/var/baz"], } } } which consistently worked, so i revisited my real module, which was giving errors it could not find (based on the above) File["/var/baz"] even though my code said ... the same. I retyped the line (believing in gremlins, ferries, malicious spirits and invisible control characters) and things stopped failing. my code, which is still very much in development (for those who want to weep): class bigbrother { if (skip_bigbrother != "true") { user { "bb": name => "bb", uid => "920", gid => "920", comment => "Big Brother", home => "/var/bb/bb", shell => "/bin/sh", } file { "/var/bb": ensure => directory, } file { "/var/bb/bbc1.9e-btf": path => "/var/bb/bbc1.9e-btf", owner => bb, group => bb, mode => 775, recurse => true, source => "puppet:///bigbrother/bbc1.9e- btf_generic", require => [ file["/var/bb"], user["bb"] ], ignore => ".svn" } file { "/var/bb/bb": ensure => "/var/bb/bbc1.9e-btf", require => file["/var/bb/bbc1.9e-btf"], } ## edit the bb-hosts file bb-hosts { puppet: ipaddress => $ipaddress, fqdn => $fqdn, require => file["/var/bb/bb"], } ## choose by OS for specific case $operatingsystem { ## or centos redhat: { file # { "/var/bb/bbc1.9e-btf_linux/etc": { "/var/bb/bbc1.9e-btf/etc": # path => "/var/bb/bbc1.9e-btf/etc", owner => bb, group => bb, mode => 775, # recurse => true, source => [ "puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbdef.sh", "puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbsys.local", "puppet:///bigbrother/bbc1.9e-btf_linux/etc/bbsys.sh", ], require => file["/var/bb/bbc1.9e-btf"], ignore => ".svn", } # # file # { "/var/bb/bbc1.9e-btf_linux/bin": ## path => "/var/bb/bbc1.9e-btf/bin", # owner => bb, # group => bb, # mode => 775, ## recurse => true, # source => # [ # "puppet:///bigbrother/bbc1.9e-btf_linux/bin/bb", # "puppet:///bigbrother/bbc1.9e-btf_linux/bin/bbrun", # "puppet:///bigbrother/bbc1.9e-btf_linux/bin/getipaddr", # "puppet:///bigbrother/bbc1.9e-btf_linux/bin/tcp_wrapper.sh", # "puppet:///bigbrother/bbc1.9e-btf_linux/bin/touchtime", # ], ## require => file["/var/bb/bbc1.9e_btf"], # } # # file # { "/var/bb/bbc1.9e-btf_linux/init": # path => "/etc/rc.d/init.d/bigbrother- client-local", # owner => root, # group => root, # mode => 700, # source => "puppet:///bigbrother/bbc1.9e- btf_linux/init/bigbrother-client-local", # # require => [ file["/var/bb/bbc1.9e-btf_linux/ etc"], file["/var/bb/bbc1.9e-btf_linux/bin"], ], # } # # exec # { "/sbin/chkconfig bigbrother-client-local on": # cwd => "/", ## require => file["/var/bb/bbc1.9e-btf_linux/init"], # } # } } } } define bb-hosts($ipaddress, $fqdn) { file { "/var/bb/bb/etc/bb-hosts": path => "/var/bb/bb/etc/bb-hosts", owner => bb, group => bb, mode => 664, content => template("bigbrother/bb-hosts.erb"), notify => Service[bigbrother-client-local], } service { bigbrother-client-local: ensure => running, } } But like i said, all the commented in stuff is starting to work. cheers chakkerz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Seemingly Similar Threads
- mailalias ... not doing anything???
- Best Practice: how to organize puppetmaster directories?
- Re: creating a custom type to replace a line in a file
- config question for proxyarp hosts?
- Could not call fileserver.describe: #<Errno:: ECONNRESET: Connection reset by peer>