----- Original Message ----- > From: "tobias" <to...@nine.ch> > To: puppet-users@googlegroups.com > Sent: Tuesday, June 26, 2012 1:52:48 PM > Subject: [Puppet Users] access "indexed" facter facts > > Hi everyone, > > I have a fact which looks like that: drbdconnectionstate0. You see > the "0" at the end... Now I'd like to access this fact in a > "dynamic" way, the "0" should be variable. I'm thinking of something > like that: if ${drbdconnectionstate0}${drbddevice} == > 'Unconfigured'. > But as you may guess, this does not work... Has anyone an idea how I > can use such a "dynamic" facter variable? > > Thanks for every help!
The puppetlabs-stdlib module has a getvar() function: $x = getvar("${drbdconnectionstate0}${drbddevice}") -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.