On Sun, Jan 18, 2009 at 7:57 PM, chakkerz <chakk...@gmail.com> wrote:

>
> Awesome
>
> Thanks for the Template idea Teyo, that looks exactly like what i
> want.
>
> So i created my templte sshd_config.erb
>
> Port 22
> Protocol 2
> ListenAddress <%= listenaddress %>
> #ListenAddress ::
>
> SyslogFacility AUTHPRIV
> PermitRootLogin no
> #StrictModes yes
> PasswordAuthentication no
> ChallengeResponseAuthentication no
> GSSAPIAuthentication yes
> GSSAPICleanupCredentials yes
> UsePAM yes
> X11Forwarding yes
> Banner /etc/motd
> Subsystem       sftp    /usr/libexec/openssh/sftp-server
>
> Third line <%= listenaddress %> although
> http://reductivelabs.com/trac/puppet/wiki/TypeReference
> indicates that maybe it should be &lt;%= listenaddress %> instead (i'm
> guessing it doesn't make a difference post processing?) eitherway i
> get the following error:
>
> [r...@puppetslave puppet]# puppetd -vt ; cat /etc/ssh/sshd_config
> info: Retrieving plugins
> err: Could not retrieve catalog: wrong number of arguments (1 for 2)
> at /etc/puppet/modules/sshdconfig/manifests/init.pp:14 on node
> puppetslave.its.uq.edu.au
> warning: Not using cache on failed catalog
>
> with my module's manifest/init.pp looking like:
> define sshd_config($listenaddress)
> {
>       file
>       { "sshd_config":
> #               path => $operatingsystem ?
> #                {
> #                        solaris => [ "/usr/local/etc/ssh/
> sshd_config", "/etc/ss
> h/sshd_config" ],
> #                        default => [ "/etc/ssh/sshd_config" ],
> #                },
>               path => "/etc/sshd/sshd_config",
>               owner => root,
>               group => root,
>               mode => 444,
>               content => template("sshd_config.erb"),


You just need to include the module name in the path.  Assuming your module
is named ssh, this what the arguments to the template function should look
like:

content => template("ssh/sshd_config.erb"),


> #               listenaddress => $ipaddress,
>               notify => Service[sshd],
>       }
> }
>
>
> class sshdconfig
> {
>       sshd_config{ puppet: listenaddress => $ipaddress }
> }
>
> So looking at the template guide, i don't see $name (which is used in
> it's example template) specified anywhere, but i'm a little lost...
>
> sorry about all the hand holding...


No problem.  This discussion should probably move over to the user list
though, so I CC'd that list as well.

>
>
> I'm going to check out David's Augeas method next...
>
> chakkerz
> >
>


-- 
Teyo Tyree :: www.reductivelabs.com :: +1.615.275.5066

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to