FAQ
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 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.

Search Discussions

  • Johan De Wit at Oct 12, 2012 at 10:38 am

    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 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.
    http://docs.puppetlabs.com/guides/style_guide.html#quoting

    use double quotes when you have variables in your string.

    Grts

    Jo

    --
    Johan De Wit

    Open Source Consultant (rhce : 805008667232363)
    _________________________________________________________

    Open-Future Phone +32 (0)2/255 70 70
    Zavelstraat 72 Fax +32 (0)2/255 70 71
    3071 KORTENBERG Mobile +32 (0)474/42 40 73
    BELGIUM http://www.open-future.be
    _________________________________________________________

    --
    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.
  • Garrett Honeycutt at Oct 12, 2012 at 11:13 am

    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 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.
    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 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.
  • Saurabh Bathe at Oct 12, 2012 at 1:24 pm

    On Fri, Oct 12, 2012 at 5:52 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'
    Does putting the string under double quotes work?
    $pidfile = "/var/lib/mysql/${fqdn}.pid"

    --
    ---
    Thanks
    Saurabh Bathe
    +91 9422785635

    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 12, '12 at 7:59a
activeOct 12, '12 at 1:24p
posts4
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase