Blame view

ssh_config.erb 839 Bytes
aede9435   Antonio Terceiro   centralize IP con...
1
2
3
4
5
6
7
8
9
10
11
Host *
  User vagrant
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentitiesOnly yes
  LogLevel FATAL

<% $nodes.each do |node| %>
Host <%= node.hostname %>
  Hostname <%= node.data['peers'][node.hostname] %>
0433524f   Antonio Terceiro   Add `preconfig` t...
12
  Port <%= node.data.fetch('ssh_port', 22) %>
aede9435   Antonio Terceiro   centralize IP con...
13
14
15
  IdentityFile <%=  (Dir.glob(".vagrant/machines/#{node.hostname}/*/private_key") + [File.expand_path('~/.vagrant.d/insecure_private_key')]).find { |f| File.exists?(f) }.tap { |f| File.expand_path(f) } %>
<% end %>

0433524f   Antonio Terceiro   Add `preconfig` t...
16
17
18
19
20
Host reverseproxy.unconfigured
  Hostname <%= $nodes.first.data['peers']['reverseproxy'] %>
  Port 22
  IdentityFile <%=  (Dir.glob(".vagrant/machines/reverseproxy/*/private_key") + [File.expand_path('~/.vagrant.d/insecure_private_key')]).find { |f| File.exists?(f) }.tap { |f| File.expand_path(f) } %>

aede9435   Antonio Terceiro   centralize IP con...
21
# vim: ft=sshconfig