On Thu, 2009-01-15 at 16:30 -0800, chakkerz wrote:
> The premise is simple, what's causing for me this need for this type
> is that i can't find anything that does it for me (augeas was
> mentioned but i don't get the red hat site's relevance and there is no
> info on the puppet site). What i want to do is ensure that the
> sshd_config contains a line that specifies the listen address. This
> should be tied to the IP address that the host uses to communicate to
> the puppet server, and thus it's primary IP, and what i gather the
> fact $ipaddress denotes.
> 
> The problem is that i don't want to resort to sed and grep (or perl)
> to find if a line needs replacing etc.

That's exactly why Augeas exists ;)

If you truely only want a single ListenAddress with a given value in
your sshd_config, it's as simple as

        # You might need a little OS dependant logic to figure out
        # the exact location of sshd_config
     $sshd_config = "/etc/ssh/sshd_config"
        augeas { sshd-config-listenaddress:
          changes => "set /files/$sshd_config/ListenAddress $ipaddress"
        }
        
David




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

Reply via email to