Zachary Stern
2012-Sep-22 19:14 UTC
[Puppet Users] variable usage in a string, scenario dependent?
Possibly stupid question - how do I know when I have to use a variable in a string like this - "${apache::params::moddir}/php.conf" - or when it''s safe to just do it like this - "$apache::params::moddir/php.conf". It seems like sometimes I need to do the former, and other times the latter. I don''t really have any prior programming knowledge - I feel like this would be obvious if I did. :-( -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Zachary Alex Stern
2012-Sep-22 19:23 UTC
[Puppet Users] Re: variable usage in a string, scenario dependent?
It turns out that you do always need the {}, and this just works because the / in the path breaks the variable-finding regex. Thanks to rodjek on irc! :-D On Saturday, September 22, 2012 3:15:07 PM UTC-4, Zachary Alex Stern wrote:> > Possibly stupid question - how do I know when I have to use a variable > in a string like this - "${apache::params::moddir}/php.conf" - or when > it''s safe to just do it like this - > "$apache::params::moddir/php.conf". It seems like sometimes I need to > do the former, and other times the latter. > > I don''t really have any prior programming knowledge - I feel like this > would be obvious if I did. :-( >-- 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/-/_obS97BTTYsJ. 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.