Pardon my ignorance, but how do I do a notice statement? I checked the puppet database and the value is there:
mysql> select * from parameters where host_id = 133; +----+--------+-------+---------+--------------------- +---------------------+--------------+---------------+-----------+ | id | name | value | host_id | created_at | updated_at | hostgroup_id | type | domain_id | +----+--------+-------+---------+--------------------- +---------------------+--------------+---------------+-----------+ | 45 | $group | test | 133 | 2010-09-14 17:04:15 | 2010-09-14 19:19:53 | NULL | HostParameter | NULL | +----+--------+-------+---------+--------------------- +---------------------+--------------+---------------+------ I'm using puppet 0.25.5/ MySql for stored configs / Foreman for Ext Nodes. On Sep 15, 4:28 am, Brice Figureau <[email protected]> wrote: > On Tue, 2010-09-14 at 17:21 -0700, CraftyTech wrote: > > Has anyone used this feature? > > Yes I do and it works fine. > What db engine are you using? > See below for more ideas of debugging the issue. > > > > > > > On Sep 14, 4:08 pm, CraftyTech <[email protected]> wrote: > > > btw: I'm running puppet 0.25.5 > > > > On Sep 14, 3:53 pm, CraftyTech <[email protected]> wrote: > > > > > Hello All, > > > > > I've been battling with issue all day to no avail. I'm exporting > > > > all host entries this way: > > > > class basics::host_export { @@host{ "$fqdn": > > > > ip => $ipaddress, > > > > host_aliases => $hostname, > > > > tag => $group > > > > }} > > > > and I'm collecting them this way: > > > > class basics::host_collect { Host <<|tag==$group |>> } > > > > > The values for $group is obviously defined. The thing is that > > > > specifying the tag=>$group doesn't work for me, I always get (from > > > > debug mode): > > > > > debug: Scope(Class[basics::basics::host_collect]): Collected 0 Host > > > > resources in 0.01 seconds.. > > > > > It doesn't collect any nodes even though I've defined a couple. If I > > > > do the same thing without the tag definition, it works fine; i.e: > > > > > class basics::host_export { @@host{ "$fqdn": > > > > ip => $ipaddress, > > > > host_aliases => $hostname > > > > }} > > > > class basics::host_collect { Host <<| |>> } > > > > > The thing is that I don't want to get all hosts, I want to filter per > > > > group. Can anyone share how they're doing this? Thanks, > > Are you sure you already have exported some hosts? > You can check your exported resources database for this resource, they > should have the exported column non-null (or 1). > > You should also check, still in the database, that this resource is > tagged with the correct value of $group. > > Check $group is defined in both classes (use some notice statement to > debug). It is possible that because of scope issues $group is not > defined when you collect. > > Try to collect by title (ie title == "knownhost") to see if that works > better. That will let you know if the system is working correctly for > you. > > HTH, > -- > Brice Figureau > Follow the latest Puppet Community evolutions onwww.planetpuppet.org! -- 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.
