Hi
I have created virtual resource in my test module
#-(r...@puppet-master)-(/etc/puppet/modules/staging/test/manifests)-#
> #-(0)> cat /etc/puppet/modules/staging/test/manifests/init.pp
>
> class export_file {
> @@file { "/var/lib/puppet/test_file" :
> content => "$fqdn" ,
> tag => "xxx" ,
> ensure => present ,
> }
> @@file { "/tmp/export.$fqdn": content => "$fqdn.exported" , tag =>
> "xxx" , ensure => present , }
> @@sshkey { $hostname: type => dsa , key => $sshdsakey }
> Sshkey <<| |>>
> }
>
Then I'm creating a base class to be included in base node
#-(r...@puppet-master)-(/etc/puppet/manifests/common/nodes)-#
> #-(0)> cat /etc/puppet/manifests/common/nodes/nodes.pp
> class base_node {
> include ganglia_client
> include bootstrap::common
> include snmp
> include cacti::client
> include export_file
> File <<| |>>
> realize ( File["/usr/local/bin/iostat.pl"] , Cron["iostat"] )
> }
>
>
> #-(r...@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-#
> #-(0)> cat nodes.pp
> class lhb_basenode {
> include base_node
> include apache
> include mysql::common
> realize(Package["mysql-devel"])
> realize(Package["net-snmp-devel"])
> }
>
> node lhb-staging {
> $project = 'lhb'
> $environment = 'staging'
> include lhb_basenode
> }
>
After that I'm defining my host
#-(r...@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-#
> #-(0)> cat hosts.pp
> node "lhb-puppet.staging.internal.abc.com" inherits lhb-staging {
> File <<| |>>
> }
>
Similarly i define around 19 hosts in my nodes and hosts definitions . When
i run puppet on my client nodes i can see the export_file being loaded in
localconfig.yaml but that class doesn't have any children . And the exported
resources not being realized on it .
[r...@lhb-puppet puppet]# grep -B 2 -A 5 export_file localconfig.yaml
> - !ruby/object:Puppet::TransBucket
> type: Class
> name: export_file
> children: []
>
> - !ruby/object:Puppet::TransBucket
> type: Class
> name: ganglia_client
> --
> - snmp
> - cacti::client
> - export_file
> - apache
> - mysql::common
>
When i looked around in database i can see all the exported resources by
every hosts in it. Attaching the output of mysql query "select * from
resources where exported =1"
I can't understand where I'm wrong here , Please let me know if I'm not
clear in explaining my problem .
Thanks
Saurabh Verma
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---