ghoneycutt / puppet-module-ssh

Puppet module to manage SSH
Other
34 stars 184 forks source link

Add support for debian9 #309

Closed hdep closed 5 years ago

hdep commented 5 years ago

Hi,

here is a PR to add support for debian 9 which use ssh 7.4. I try to do my best for the tests, but I'm not sure I did it right. Please le me know !

Thanks

hdep commented 5 years ago

cool I made it ! Let me know what do you think @ghoneycutt

Regards,

ghoneycutt commented 5 years ago

Looks good. Could you please update the metadata.json as well as the list of supported platforms in README.md and then squash your commits into one commit and I'll get this merged.

hdep commented 5 years ago

it doesn't compile anymore since I use default debian 9 sshd file.

ghoneycutt commented 5 years ago

You would need a conditional statement under Debian for Debian 9 and set any default values so that it aligns with what Debian 9 uses.

https://github.com/ghoneycutt/puppet-module-ssh/blob/master/manifests/init.pp#L195 and

ghoneycutt commented 5 years ago

Awesome work! Reminder that we'll also need the ssh_config file

hdep commented 5 years ago

thanks ! I added a default case statement, but this will break Debian 8 clients I'm not happy with that. To avoid this I could use the same case for Debian 7 and Debian 8.

What do you think ?

hdep commented 5 years ago

I'm not able to configure rspec for os release major facts. Any help appreciated.

hdep commented 5 years ago

Hi, If I don't use my fact it is fine. Now I don't understand how the module works, which value I must set or not to math my fixture file. I got this error on build should contain File[sshd_config] with content supplied string (FAILED - 2) thanks for your help

hdep commented 5 years ago

Ok, the module set too much options by default for Debian 9 i.e PrintMotd yes is kind of hardcoded so changing the behaviour seems a hughe work for me. Maybe the best thing is to change the debian 9 fixtures to match the default of the module. This is what is done for debian 7 I think. what do you think @ghoneycutt ?

hdep commented 5 years ago

Well I can't make this work i'm stuck.

hdep commented 5 years ago

Its building now. Can you please let me know what you think ? thanks !

ghoneycutt commented 5 years ago

hdep, you need some help getting testing working on your local system?

ghoneycutt commented 5 years ago

Awesome job on adding Debian 9 support!!

ghoneycutt commented 5 years ago

@hdep could you do the small change to the spec test regarding reverting the whitespace changes and then squash/rebase your commits into one commit and I'll get this merged.

to squash/rebase, run git log and find the first commit before you started. Then do git rebase -i <commit you just looked up>

You will see all your commits. Keep the first one and for the rest, change pick to s and save with a commit message like 'Add support for Debian 9' or similar.

hdep commented 5 years ago

@ghoneycutt will do the rebase. I just added a fail message for default case.

ghoneycutt commented 5 years ago

Thanks! Released in v3.60.0