Showing with 21 additions and 6 deletions.
  1. +3 −0 CHANGELOG.md
  2. +6 −5 manifests/init.pp
  3. +1 −1 metadata.json
  4. +11 −0 spec/classes/init_spec.rb
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v3.51.1 - 2017-05-19
* Ensure that ssh_known_hosts requires the ssh packages

### v3.51.0 - 2017-05-17
* Add params sshd_config_hostcertificate and
sshd_config_trustedusercakeys to set HostCertificate and TrustedUserCAKeys.
Expand Down
11 changes: 6 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,12 @@
}

file { 'ssh_known_hosts':
ensure => file,
path => $ssh_config_global_known_hosts_file,
owner => $ssh_config_global_known_hosts_owner,
group => $ssh_config_global_known_hosts_group,
mode => $ssh_config_global_known_hosts_mode,
ensure => file,
path => $ssh_config_global_known_hosts_file,
owner => $ssh_config_global_known_hosts_owner,
group => $ssh_config_global_known_hosts_group,
mode => $ssh_config_global_known_hosts_mode,
require => Package[$packages_real],
}

# import all nodes' ssh keys
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ghoneycutt-ssh",
"version": "3.51.0",
"version": "3.51.1",
"author": "ghoneycutt",
"summary": "Manages SSH",
"license": "Apache-2.0",
Expand Down
11 changes: 11 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@
})
}

facts[:ssh_packages].each do |pkg|
it {
should contain_file('ssh_known_hosts').that_requires("Package[#{pkg}]")
}
end

it {
should contain_file('ssh_config').with({
'ensure' => 'file',
Expand Down Expand Up @@ -1990,6 +1996,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
})
}

Expand Down Expand Up @@ -2086,6 +2093,7 @@
'owner' => 'gh',
'group' => 'root',
'mode' => '0644',
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
})
}
end
Expand All @@ -2112,6 +2120,7 @@
'owner' => 'root',
'group' => 'gh',
'mode' => '0644',
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
})
}
end
Expand All @@ -2138,6 +2147,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0666',
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
})
}
end
Expand Down Expand Up @@ -2201,6 +2211,7 @@
'owner' => 'root',
'group' => 'root',
'mode' => '0644',
'require' => ['Package[openssh-server]', 'Package[openssh-clients]'],
})
}
end
Expand Down