[chef] Re: openssh Cookbook - why default attribute default['openssh']['client']['host'] = '*' - override?


Chronological Thread 
  • From: Tensibai < >
  • To:
  • Subject: [chef] Re: openssh Cookbook - why default attribute default['openssh']['client']['host'] = '*' - override?
  • Date: Thu, 24 Sep 2015 10:16:22 +0200

To just answer: in your wrapper cookbook, override the value with what you wish like this for example:

default['openssh']['client']['host'] = '*.my.domain'

The attribute will be update before the recipe is evaluated, and it will update the file accordingly.

What I don't understand is why you don't wish a Host * in your ssh_config.

It is to declare the defaults value for all hosts, until another "Host something" entry is found which in turn could update settings with specific values for the "something" pattern.

I'm even unsure keywords before a Host line will be used by the ssh client.

Le 2015-09-22 16:37, Alexander Skwar a écrit :

Hello
 
In the openssh Cookbook from Supermarket @ supermarket.chef.io/cookbooks/openssh, the attributes file for the "client section" contains this:
 
default['openssh']['client']['host'] = '*'
 
 
Short question: How do I get rid of this, without having to modify the openssh/attributes/default.rb file; ie. from my own cookbook, which has a "include_recipe "openssh"" somewhere.

 
​Because of that, the generated /etc/ssh/ssh_config file contains at least this:
 
$ cat /etc/ssh/ssh_config 
# This file was generated by Chef for host
# Do NOT modify this file by hand!
 
Host *
Ie., there's at least a "Host *" entry. And the way I have it now, all my attributes are below that; ie. my ssh_config file reads:
 
$ cat /etc/ssh/ssh_config 
# This file was generated by Chef for host
# Do NOT modify this file by hand!
 
Host *
GlobalKnownHostsFile /var/lib/sss/pubconf/known_hosts
PubkeyAuthentication yes
VerifyHostKeyDNS no
#VerifyHostKeyDNS:No-SonstIstEsZuLangsam no
HostKeyAlgorithms ssh-rsa,ssh-dss
ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h
 
That's not quite what I want. I don't want that "Host *" line there.
 
 
Thanks a lot,

Alexander
-- 
=>        Google+ => http://plus.skwar.me         <==
=> Chat (Jabber/Google Talk) => 
 
 ">
  <==

 

 



Archive powered by MHonArc 2.6.16.

§