I can think of something really hacky that I don't recommend for production, it could be ok for debugging purposes.
notice(inline_template( '<%= $dangerous_counter = $dangerous_counter || 0; $dangerous_counter = $dangerous_counter + 1 %>' )) will create a global variable in Ruby, I have a feeling that this will increment for all nodes if you are running a master though. On Tue, Sep 27, 2011 at 3:12 PM, Douglas Garstang <[email protected]>wrote: > I want to set a variable in a class, and then increment the value of > that variable each time a definition is called. Since I have to > qualify the variable in the definition, like so: > > $platform::proxy::config::ssl_port_start > > I tried this: > > $platform::proxy::config::ssl_port_start = > $platform::proxy::config::ssl_port_start + 1 > > but then puppet complains: > > "Cannot assign to variables in other namespaces at..." > > .... and since I have to qualify the original variable.... ugh.... how > can I do this? > > Doug > > -- > 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. > > -- 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.
