FAQ
I´m using stdlib 3.2 on my 3.0.1 master/agent

my goal is to replace a line within a configuration file to add one more
server like this:
file_line { "xxx": line => "ALLOWHOST server1|server2", path => "/tmp/sw",
match => "^ALLOWHOST$", ensure => present }

I´ve tried to use match to ensure that the existing line is changed, but
I´m getting this error message:
Error: Failed to apply catalog: When providing a 'match' parameter, the
value must be a regex that matches against the value of your 'line'
parameter

how can I solve this?

thanks
,
Stefan

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

  • GRANIER Bernard (MORPHO) at Jan 18, 2013 at 9:14 am
    Hi,

    Since no one answered to my previous post, I suppose that it is not possible to do something like that :

    $machines_DB="\'computerName\'"

    $machines_serverWeb="\'computerName2\'"

    node $machines_DB {
    include deploymenDB
    }

    node $machines_serverWeb {
    include deploymentServerWeb
    }



    #
    " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."
    #

    --
    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.
  • Ellison Marks at Jan 18, 2013 at 5:50 pm
    @Stephan, as it stands, the match parameter must be able to regex match the
    line parameter. I think this is so you can only replace similar lines. You
    could drop the $ at the end and it would probably work.

    @bernard, I think something is wrong with the client you use to access the
    group. Your replies are getting posted to random threads.
    On Friday, January 18, 2013 12:07:44 AM UTC-8, Stefan Wiederoder wrote:

    I´m using stdlib 3.2 on my 3.0.1 master/agent

    my goal is to replace a line within a configuration file to add one more
    server like this:
    file_line { "xxx": line => "ALLOWHOST server1|server2", path => "/tmp/sw",
    match => "^ALLOWHOST$", ensure => present }

    I´ve tried to use match to ensure that the existing line is changed, but
    I´m getting this error message:
    Error: Failed to apply catalog: When providing a 'match' parameter, the
    value must be a regex that matches against the value of your 'line'
    parameter

    how can I solve this?

    thanks
    ,
    Stefan
    --
    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/-/KLQA7jprjm4J.
    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.
  • Stefan Wiederoder at Jan 21, 2013 at 1:16 pm
    Hello Ellison,

    yes, you´re right, now it´s working:

    file_line { "xxx": line => "ALLOWHOST server1|server2", path => "/tmp/sw",
    match => "ALLOWHOST.*$", ensure => present }


    thanks
    ,
    Stefan

    Am Freitag, 18. Januar 2013 18:50:36 UTC+1 schrieb Ellison Marks:
    @Stephan, as it stands, the match parameter must be able to regex match
    the line parameter. I think this is so you can only replace similar lines.
    You could drop the $ at the end and it would probably work.

    @bernard, I think something is wrong with the client you use to access the
    group. Your replies are getting posted to random threads.
    On Friday, January 18, 2013 12:07:44 AM UTC-8, Stefan Wiederoder wrote:

    I´m using stdlib 3.2 on my 3.0.1 master/agent

    my goal is to replace a line within a configuration file to add one more
    server like this:
    file_line { "xxx": line => "ALLOWHOST server1|server2", path =>
    "/tmp/sw", match => "^ALLOWHOST$", ensure => present }

    I´ve tried to use match to ensure that the existing line is changed, but
    I´m getting this error message:
    Error: Failed to apply catalog: When providing a 'match' parameter, the
    value must be a regex that matches against the value of your 'line'
    parameter

    how can I solve this?

    thanks
    ,
    Stefan
    --
    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/-/rvcMdignUksJ.
    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
postedJan 18, '13 at 8:07a
activeJan 21, '13 at 1:16p
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase