Skip to content

Commit 56dd7de

Browse files
committed
P:base: provision ssh CA key as known_hosts
Needed to SSH between hosts without host key warnings. (Or you could provision a known_hosts based on key data from PuppetDB, but this is easier.)
1 parent c17fd42 commit 56dd7de

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

modules/profile/manifests/base.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
class { 'ssh::server':
1919
enable_ssh_ca => $enable_ssh_ca,
2020
}
21+
class { 'ssh::client':
22+
enable_ssh_ca => $enable_ssh_ca,
23+
}
2124

2225
class { 'users':
2326
accounts => $accounts,

modules/ssh/manifests/client.pp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @summary ssh client configuration
2+
class ssh::client (
3+
Boolean $enable_ssh_ca,
4+
) {
5+
if $enable_ssh_ca {
6+
$ca_pub_data = jqlib::secret('ssh_ca/ca.pub')
7+
file { '/etc/ssh/ssh_known_hosts':
8+
ensure => file,
9+
content => "@cert-authority *.ops.jquery.net ${ca_pub_data}\n",
10+
mode => '0444',
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)