Issue #2133 has been updated by [email protected].

Status changed from Accepted to Ready for Testing

I have sent a pull request for the following branch:

http://github.com/bkearney/puppet/commits/ticket/0.24.x/2141

Please test this branch and let me know if it works. Please be aware there are 
some subtle changes in the type which may cause issues for you. These are:

1) There can be no ' or " characters around path elements.
2) The context is now only prepended to relative paths. So, if a
path is specified as /foo/bar the context will not be appended. It
will only be appended if it is foo/bar
3) The syntax for array matching in the onlyif is now eq or noteq.
It was == before.
4) The get and set commnands used to concatenate all items at the end
of a string so "set path to some value" would be interpreted as
"set" "path" "to some value". This is no longer supported. The caller
must put ' or " around the "to some value" for it to work" 
----------------------------------------
Bug #2133: augeas 0.4+ path expressions not working in 0.24.8
http://projects.reductivelabs.com/issues/2133

Author: jab
Status: Accepted
Priority: Normal
Assigned to: [email protected]
Category: 
Target version: 
Complexity: Unknown
Affected version: 0.24.8
Keywords: 


I'm trying to use the expanded path expressions added in augeas 0.4.0 (I'm 
using 0.4.1 from EPEL):
<pre>
  augeas { "pam_access.so":
        context => "/files/etc/pam.d/sshd",
        changes => [
            "ins 1000 before *[type='account'][module='pam_nologin.so']",
            "set 1000/type account",
            "set 1000/control required",
            "set 1000/module pam_access.so",
        ],
        onlyif  => "match 
*[type='account'][control='required'][module='pam_access.so'] size == 0",
  }
</pre>

It returns this error:
<pre>
Failed to retrieve current state of resource: Error sending command 'ins 1000 
before *[type=' with params ["account", "][module= pam_nologin.so ]"]/Command 
'ins 1000 before *[type=' is not supported
</pre>

I found that reverting the change made for #1835 fixed the problem.  It appears 
it's not expecting the quotes in these newer path expressions and misparses as 
a result.


-- 
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://reductivelabs.com/redmine/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