Skip to content

Commit

Permalink
add freebsd support
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed Mar 2, 2014
1 parent 121e5c4 commit e622c64
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
10 changes: 6 additions & 4 deletions manifests/client/install.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
class ssh::client::install {
if !defined(Package[$ssh::params::client_package_name]) {
package { $ssh::params::client_package_name:
ensure => present,
class ssh::client::install inherits ssh::params {
if $ssh::params::client_package_name {
if !defined(Package[$ssh::params::client_package_name]) {
package { $ssh::params::client_package_name:
ensure => present,
}
}
}
}
8 changes: 8 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
$service_name = 'sshd'
}
freebsd: {
$server_package_name = undef
$client_package_name = undef
$sshd_config = '/etc/ssh/sshd_config'
$ssh_config = '/etc/ssh/ssh_config'
$ssh_known_hosts = '/etc/ssh/ssh_known_hosts'
$service_name = 'sshd'
}
default: {
case $::operatingsystem {
gentoo: {
Expand Down
11 changes: 6 additions & 5 deletions manifests/server/install.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
class ssh::server::install {
include ssh::params
if !defined(Package[$ssh::params::server_package_name]) {
package { $ssh::params::server_package_name:
ensure => present,
class ssh::server::install inherits ssh::params {
if $ssh::params::server_package_name {
if !defined(Package[$ssh::params::server_package_name]) {
package { $ssh::params::server_package_name:
ensure => present,
}
}
}
}

0 comments on commit e622c64

Please sign in to comment.