On 10/12/12 12:38 PM, Johan De Wit wrote:
> On 10/12/2012 02:22 AM, Zane Williamson wrote:
>> Hi All,
>>
>> I am using puppet-labs/mysql forge module, but the MySQL package we
>> use is the MySQL-server-community packages.
>>
>> Basically I am need to update a paratmeter
>>
>> $pidfile = '/var/lib/mysql/${fqdn}.pid'
>>
>> Where I can put the FQDN into the pidfile variable as suggested above.
>> However it appears I can can't use Facter variables in strings.
>>
>> I am running on latest 2.7 build for server/agent.
>>
>> Please let me know if you have any suggestions.
>>
>> -Zane
>> --
>> 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/-/Mla0hn77K48J.
>> 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.
> http://docs.puppetlabs.com/guides/style_guide.html#quoting
>
> use double quotes when you have variables in your string.
>
> Grts
>
> Jo
>
Here's a link[1] to what Johan mentioned. Facts should also be fully
scoped. Notice the :: before the facter variable in the code below.
$localvar = 'somevalue'
$string = "${::fqdn}-${localvar}"
[1] -
http://docs.puppetlabs.com/guides/language_guide.html#variable-interpolation-with-quotes
-g
--
Garrett Honeycutt
206.414.8658
http://puppetlabs.com
--
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.