variable usage in a string, scenario dependent?

10 views
Skip to first unread message

Zachary Stern

unread,
Sep 22, 2012, 3:14:20 PM9/22/12
to puppet...@googlegroups.com
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. :-(

Zachary Alex Stern

unread,
Sep 22, 2012, 3:23:20 PM9/22/12
to puppet...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages