I am trying to get stdlib installed and working as mentioned in the module of the week blog post - http://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppet-labs-standard-library/ . I ran following file_line test without noop mode. It created the required file however it didn''t agree to the fact that ''dan is awesome'' (created empty file). {{{ $ puppet apply stdlib/tests/file_line.pp notice: /Stage[main]//File[/tmp/dansfile]/ensure: created notice: Finished catalog run in 0.02 seconds $ cat /tmp/dansfile $ }}} I tried to use some of the functions in stdlib, e.g. validates_re, however that resulted in ''Unknown function'' error. So I am not sure if this module is installed correctly. Following is the system information: * CentOS release 6.2 * ruby 1.8.7 * facter 1.6.6 * Puppet 2.6.14 * stdlib was installed using puppet-module, however initially I had manually cloned stdlib git repository which didn''t work as well. Appreciate any help on how to debug this further. -- Thanks, Shantanu -- 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.
Shantanu: There is a related thread - "stdlib module not working" - : https://groups.google.com/group/puppet-users/browse_thread/thread/9a2502a8fb4f4d50/3f988a9300c78ed2?lnk=gst&q=stdlib#3f988a9300c78ed2 On Apr 9, 9:39 am, Shantanu <knowshant...@gmail.com> wrote:> I am trying to get stdlib installed and working as mentioned in the > module of the week blog post -http://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppet... > . > > I ran following file_line test without noop mode. It created the > required file however it didn''t agree to the fact that ''dan is > awesome'' (created empty file). > > {{{ > $ puppet apply stdlib/tests/file_line.pp > notice: /Stage[main]//File[/tmp/dansfile]/ensure: created > notice: Finished catalog run in 0.02 seconds > > $ cat /tmp/dansfile > $ > > }}} > > I tried to use some of the functions in stdlib, e.g. validates_re, > however that resulted in ''Unknown function'' error. So I am not sure if > this module is installed correctly. Following is the system > information: > * CentOS release 6.2 > * ruby 1.8.7 > * facter 1.6.6 > * Puppet 2.6.14 > * stdlib was installed using puppet-module, however initially I had > manually cloned stdlib git repository which didn''t work as well. > > Appreciate any help on how to debug this further. > > -- > Thanks, > Shantanu-- 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.
On Mon, Apr 9, 2012 at 12:57 PM, harveyzh <zh.jliang@gmail.com> wrote:> Shantanu: > > There is a related thread - "stdlib module not working" - :Yes, I think the take away from that thread as it relates to this issue is to specify: file_line { ''/tmp/dansfile'': ensure => present, ... } The other issue you mentioned with functions appears to be an separate issue. I believe Puppet 2.6 has problems loading functions from modules if you''re using puppet apply instead of puppet agent with pluginsync. Please try Puppet 2.7 if you''d like to use puppet apply with stdlib in the modulepath. Hope this helps, -Jeff McCune -- 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.
On Apr 9, 1:14 pm, Jeff McCune <j...@puppetlabs.com> wrote:> On Mon, Apr 9, 2012 at 12:57 PM, harveyzh <zh.jli...@gmail.com> wrote: > > Shantanu: > > > There is a related thread - "stdlib module not working" - : > > Yes, I think the take away from that thread as it relates to this issue is > to specify: > > file_line { ''/tmp/dansfile'': > ensure => present, > ... > > } > > The other issue you mentioned with functions appears to be an separate > issue. I believe Puppet 2.6 has problems loading functions from modules if > you''re using puppet apply instead of puppet agent with pluginsync. > > Please try Puppet 2.7 if you''d like to use puppet apply with stdlib in the > modulepath. > > Hope this helps, > -Jeff McCuneThanks for the help - harveyzh and Jeff. It''s working fine after I added ''ensure => present'' line to the manifest. The issue with functions is resolved as well. I had typos in couple of function names that I had tried and hence it was returning ''unknown function'' error. It worked fine for me with ''puppet apply'' as well. -- Shantanu -- 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.