Hi everyone. Mandatory disclaimer: New to puppet/clueless but learning/please don''t get fed up with me yet... Mandatory praise: Love puppet so far... Mandatory stupid first question: How do I concatenate a variable to an arbitrary string? ie. $someval="$hostname_prod_config" So if $hostname is "myserver", then $someval should result in "myserver_prod_config". I haven''t been able to find an example of this in the docs/recipes yet... Thanks, Ed
>>>>> "Edward" == Edward Simmonds <esimmonds@speakeasy.net> writes:Edward> How do I concatenate a variable to an arbitrary string? Edward> $someval="$hostname_prod_config" Edward> So if $hostname is "myserver", then $someval should result Edward> in "myserver_prod_config". See http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#id10 There is a nice example of what you want there. Sincerely, Adrian Phillips -- Who really wrote the works of William Shakespeare ? http://www.pbs.org/wgbh/pages/frontline/shakespeare/
>>>>>> "Edward" == Edward Simmonds <esimmonds@speakeasy.net> writes: > > Edward> How do I concatenate a variable to an arbitrary string? > > Edward> $someval="$hostname_prod_config" > > Edward> So if $hostname is "myserver", then $someval should result > Edward> in "myserver_prod_config". > > See http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#id10 > > There is a nice example of what you want there.Doh! I could have sworn I tried using braces... Thanks, Ed