Issue #4804 has been updated by James Turnbull.

Status changed from Unreviewed to Accepted
Target version set to 2.6.2


----------------------------------------
Bug #4804: Puppetmaster is not parsing a sed command with "a\\$line" in it 
correctly
http://projects.puppetlabs.com/issues/4804

Author: Chuck Schweizer
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 2.6.2
Affected version: 2.6.1
Keywords: 
Branch: 


Looks like the parser on the 2.6.1 puppetmaster is not dealing with the 
`a\\${line}` correctly in this code.  This code works correctly on a 0.25.5 
puppetmaster.  Notice that it is not replacing the ${line} as it was on the 
0.25.5 puppetmaster.

Here is the error

    err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate definition: Exec[/bin/sed -i '/\[components\]/ a\${line}' 
/opt/data/trac/sandbox/conf/trac.ini] is already defined in file 
/var/opt/puppet/environments/production/modules/trac/manifests/definitions/tracini.iv1_0.pp
 at line 20; cannot redefine at 
/var/opt/puppet/environments/production/modules/trac/manifests/definitions/tracini.iv1_0.pp:20
 on node client1


Here is the code

    define trac::tracinicomponentline($line, $file) {
      exec { "/bin/sed -i /\\[components\\]/ a\\${line} ${file}":
          unless => "/bin/grep -Fx '${line}' '${file}'"
      }
    }
    


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to