saltstack-formulas / openssh-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
90 stars 297 forks source link

Hostnames in known hosts #111

Closed alxwr closed 7 years ago

alxwr commented 7 years ago

Grants a wish: #110 ;-)

@doubletwist13 does that solve your problem?

Tested on Ubuntu 16.04 and FreeBSD 10.3.

doubletwist13 commented 7 years ago

Initial test doesn't seem to be working correctly, but I don't have time to look into it deeply today. One thing I'm unclear on is what I should put in the pillar if I don't want "hostnames: False", but want it to use hostname for all hosts. I've tried: hostnames: { } hostnames: '*'
and hostnames: target: '*' expr_form: 'glob'

With no luck. It still only includes the fqdn.

alxwr commented 7 years ago

@doubletwist13 In your case this should be the pillar data to use: (Notice it's under openssh:known_hosts)

openssh:
  known_hosts:
    hostnames:
      target: '*'  # all hosts, not just those in the same domain
      expr_form: 'glob'

Please format you code according to https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code. In YAML whitespace is essential. I won't be able to help you unless I see exactly what data you are using.

Also: Did you check out the branch hostnames-in-known-hosts? (Otherwise you'll be still using the unpatched master branch.)

doubletwist13 commented 7 years ago

I see now. Yes, it does appear to be working. Awesome, thanks!

aboe76 commented 7 years ago

@doubletwist13 so you aprove and we can merge this solution?

doubletwist13 commented 7 years ago

I'm not sure it's my place to approve, but I can verify that this solution is working great for me, so as far as I'm concerned you can merge it.

On Wed, Aug 9, 2017 at 3:34 PM, Niels Abspoel notifications@github.com wrote:

@doubletwist13 https://github.com/doubletwist13 so you aprove and we can merge this solution?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saltstack-formulas/openssh-formula/pull/111#issuecomment-321373636, or mute the thread https://github.com/notifications/unsubscribe-auth/AakmtLnIw6bRPCwRhvUKqLiAqD9AruTzks5sWhfDgaJpZM4OwRrh .

alxwr commented 7 years ago

@aboe76, are you going to merge, or shall i do it? :-)

aboe76 commented 7 years ago

@alxwr done, and thanks for the fix, @doubletwist13 thanks for testing.