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

Can you please take a look at the latest here:

http://github.com/bkearney/puppet/tree/1826-0.24.x

This patch should cause the puppet type to not execute if 

1) Augeas version 0.3.6 or greater is installed.
2) The filter did match  
3) The commands which are executed do not cause any files to be changed.

It does this by making the file changes when parsing if the type needs to run. 
There is a bit of a hole in that if the underlieing file is changed by another 
type during the need_to_run phase and the execute phase that the augeas type 
will overwrite it. Hopefully, 2 types are not changing the same file.

In addition, if you have version .40 of augeas, I would love to see some 
testing on the new xPath structures which David just released.


----------------------------------------
Bug #1826: augeas type executes always
http://projects.reductivelabs.com:80/issues/1826

Author: abnormaliti
Status: Accepted
Priority: Normal
Assigned to: [email protected]
Category: Red Hat
Target version: 
Complexity: Unknown
Affected version: 0.24.6
Keywords: 0.24.7


it should be as easy as:

<pre>
augeas { "sshd_HostbasedAuthentication":
           context => "/files/etc/ssh/sshd_config",
           changes => [ "set HostbasedAuthentication yes",
                        "set IgnoreUserKnownHosts yes",
                        "set IgnoreRhosts yes"
                      ],
           require => Package["openssh-server"],
           notify => Service["sshd"]
}
</pre>

but it's not.  the augeas type executes _always_ regardless if there is a 
change.

the above turns into:

<pre>
augeas { "sshd_HostbasedAuthentication":
           context => "/files/etc/ssh/sshd_config",
           changes => "set HostbasedAuthentication yes",
           onlyif => "get HostbasedAuthentication != yes",
           require => Package["openssh-server"],
           notify => Service["sshd"];
          
         "sshd_IgnoreUserKnownHosts":
           context => "/files/etc/ssh/sshd_config",
           changes => "set IgnoreUserKnownHosts yes",
           onlyif => "get IgnoreUserKnownHosts != yes",
           require => Package["openssh-server"],
           notify => Service["sshd"];
        
         "sshd_IgnoreRhosts":
           context => "/files/etc/ssh/sshd_config",
           changes => "set IgnoreRhosts yes",
           onlyif => "get IgnoreRhosts != yes",
           require => Package["openssh-server"],
           notify => Service["sshd"];
}
</pre>


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