Issue #1948 has been reported by jab.

----------------------------------------
Bug #1948: augeas ins bug: wrong number of arguments (1 for 3)
http://projects.reductivelabs.com/issues/1948

Author: jab
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Complexity: Unknown
Affected version: 0.24.7
Keywords: 


Hi,

We were trying to use augeas to insert a line into _/etc/pam.d/sshd_ (which 
needs to go in a specific place):

<pre>
augeas { "pam.d/sshd":
        context => "/files/etc/pam.d/sshd",
        changes => [
            "ins 100 before 1",
            "set 100/type auth",
            "set 100/control sufficient",
            "set 100/module pam_radius_auth.so",
        ],
        onlyif  => "get 1/module != pam_radius_auth.so",
}
</pre>

It kept returning this error:

<pre>
Error sending command 'ins' with params ["/files/etc/pam.d/sshd/100", "before 
1"]/wrong number of arguments (1 for 3)
</pre>

I looked at the puppet code and determined the problem was due to not passing 
the correct arguments to the *ins* command,
as described here by augtool:
 
<pre>
 ins <LABEL> <WHERE> <PATH>
        Insert a new node with label LABEL right before or after PATH into
        the tree. WHERE must be either 'before' or 'after'.
</pre>

I'll be submitting a patch for this shortly.


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