foo::bar problem?

11 views
Skip to first unread message

scuwolf

unread,
Sep 3, 2014, 12:23:18 PM9/3/14
to puppet...@googlegroups.com
what's happening when call 'include b' ?  why it did not take effect?

[root@master tmp]# cat test.pp
class foo::bar {
  include bar
}

class bar {
  file { "/tmp/b": ensure => present }
}

include foo::bar
[root@master tmp]# rm -f /tmp/b; puppet apply test.pp
Notice: Compiled catalog for master.163.internal in environment production in 0.28 seconds
Notice: Finished catalog run in 0.03 seconds
[root@master tmp]#

José Luis Ledesma

unread,
Sep 3, 2014, 12:40:29 PM9/3/14
to puppet...@googlegroups.com

When you include bar in class foo::bar it searches first in the foo class, so includes itself.

You should change it for:
Include ::bar
To include the just the class bar.

Regards,

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0500757c-2c34-4e8f-89e1-ca86edc08578%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages