Re: [Puppet Users] Re: puppet SSHD port based on hostname

2017-08-27 Thread Pete Brown
On Fri, 25 Aug 2017 at 23:07, John wrote: > So, I agree this is doable in Hiera. However, I think for the SAZ SSH > module, it would be better for me to include it in the sshd_config.erb. > Why? It’s a simple solution to do it in hiera. You are making th problem more complex by changing the te

Re: [Puppet Users] Re: puppet SSHD port based on hostname

2017-08-25 Thread Rob Nelson
If you're using saz/ssh, just add this to the 'options' parameter (hash) of ssh::server. Anything that doesn't have a specific parameter can be implemented there. On Fri, Aug 25, 2017 at 11:07 PM John wrote: > So, I agree this is doable in Hiera. However, I think for the SAZ SSH > module, it wo

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-25 Thread John
So, I agree this is doable in Hiera. However, I think for the SAZ SSH module, it would be better for me to include it in the sshd_config.erb. I've added the following to sshd_config.: <%- if ServerName == myhost -%> Port = <%- end -%> Puppet run finishes with no errors, but /etc/ssh/sshd_

Re: [Puppet Users] Re: puppet SSHD port based on hostname

2017-08-25 Thread Pete Brown
That is pretty easy to do with hiera. It’s too complex to explain in an email so i would recommend looking up the docs for it. This is the best olace to start. If you aren’t using puppet 5 just switch to the version you are using. https://docs.puppet.com/puppet/5.1/hiera_intro.html On Tue, 22 Aug

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-22 Thread John Baird
Honestly, I believe you would benefit from reading this over a bit... https://docs.puppet.com/puppet/5.0/lang_template_erb.html On Tuesday, August 22, 2017 at 4:37:35 PM UTC-5, John wrote: > > So I added the following to sshd_config.erb > > <%- if hostname = MyHost -%> > Port = > <%- end -%

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-22 Thread John
So I added the following to sshd_config.erb <%- if hostname = MyHost -%> Port = <%- end -%> But it did not provide the expected results. The puppet run finished cleanly, but the sshd_config remained unchanged. Does that syntax look alright? TIA On Tuesday, August 22, 2017 at 12:36:15 PM

[Puppet Users] Re: puppet SSHD port based on hostname

2017-08-22 Thread John Baird
It looks like you should be able to pass it as a Hash of "options"... https://github.com/saz/puppet-ssh/search?utf8=%E2%9C%93&q=port&type= On Tuesday, August 22, 2017 at 11:36:15 AM UTC-5, John wrote: > > I've pulled down the SAZ SSH module and implemented across my network. It > works great.