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 2017 at 21:30, John Baird <[email protected]> wrote:

> 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 = 4444
>> <%- 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 UTC-4, John wrote:
>>>
>>> I've pulled down the SAZ SSH module and implemented across my network.
>>> It works great.
>>>
>>> However, I need to implement the following change:
>>>
>>> If hostname = host1 or host2 or host3
>>>   then
>>>     port = 4444
>>> fi
>>>
>>> I just want to change the default sshd port for a few hosts.
>>>
>>> How do I do that?
>>>
>>>
>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/4a22f5df-272b-4ce6-9cad-fd60e564440f%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/4a22f5df-272b-4ce6-9cad-fd60e564440f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJ8DPF4gmGJvkackDxMdPMPHs1%3DNTjHog7wVnDCrZDzbUO9Gww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to