On Tuesday, June 12, 2012 4:57:13 PM UTC-5, Adam Heinz wrote:
Is it possible to get the value of a member variable on a collected
resource? Something like

Host <<| name == 'nagios' |>>
$nagiosip = Host["nagios"]::ip

Gepetto has red lined all of my guesses so far.
Generally speaking, it is not possible to get the value of *any* property
of *any* previously-declared resource from within your manifests. There
may be some kind of workaround involving inline templates or Ruby DSL, but
only because they cannot do their jobs without opening a window to parts of
Puppet that manifests are not intended to twiddle.

I would recommend instead recording host 'nagios''s IP in a class variable
or an external data file, and having other nodes retrieve it from there.


You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/17uCFAf-e-YJ.
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.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppuppet-users @
postedJun 12, '12 at 9:57p
activeJun 13, '12 at 5:09p

2 users in discussion

Adam Heinz: 2 posts Jcbollinger: 1 post



site design / logo © 2022 Grokbase