Skip to content

Commit

Permalink
Add support for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
martijndegouw committed Mar 23, 2020
1 parent fc9936a commit c8bafb7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/forwarder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
# This is a module that supports multiple platforms. For some platforms
# there is non-generic configuration that needs to be declared in addition
# to the agnostic resources declared here.
if $facts['kernel'] in ['Linux', 'SunOS'] {
if $facts['kernel'] in ['Linux', 'SunOS', 'FreeBSD'] {
contain 'splunk::forwarder::service::nix'
Class['splunk::forwarder::config']
-> Class['splunk::forwarder::service::nix']
Expand Down
27 changes: 27 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,27 @@
$supports_systemd = false
}
}
'FreeBSD': {
$path_delimiter = '/'
$forwarder_src_subdir = 'freebsd'
$forwarder_seed_config_file = "${forwarder_homedir}/etc/system/local/user-seed.conf"
$enterprise_seed_config_file = "${enterprise_homedir}/etc/system/local/user-seed.conf"
$forwarder_password_config_file = "${forwarder_homedir}/etc/passwd"
$enterprise_password_config_file = "${enterprise_homedir}/etc/passwd"
$forwarder_secret_file = "${forwarder_homedir}/etc/splunk.secret"
$enterprise_secret_file = "${enterprise_homedir}/etc/splunk.secret"
$forwarder_confdir = "${forwarder_homedir}/etc"
$enterprise_src_subdir = 'freebsd'
$enterprise_confdir = "${enterprise_homedir}/etc"
$forwarder_install_options = ['-f'] # ignore the wrong os major version specified in the package
$enterprise_install_options = []
$enterprise_service = 'splunk'
$forwarder_service = 'splunk'
$enterprise_service_file = '/etc/rc.d/splunk'
$forwarder_service_file = '/etc/rc.d/splunk'
$boot_start_args = ''
$supports_systemd = false
}
'windows': {
$path_delimiter = '\\'
$forwarder_src_subdir = 'windows'
Expand Down Expand Up @@ -261,6 +282,7 @@
'RedHat': { $package_provider = 'rpm' }
'Debian': { $package_provider = 'dpkg' }
'Solaris': { $package_provider = 'sun' }
'FreeBSD': { $package_provider = 'pkgng' }
'windows': { $package_provider = 'windows' }
default: { $package_provider = undef } # Don't define a $package_provider
}
Expand Down Expand Up @@ -307,6 +329,11 @@
$forwarder_package_name = 'splunkforwarder'
$enterprise_package_name = 'splunk'
}
'FreeBSD amd64': {
$package_suffix = "${version}-${build}-freebsd-11.1-amd64.txz"
$forwarder_package_name = 'splunkforwarder'
$enterprise_package_name = 'splunk'
}
default: { fail("unsupported osfamily/arch ${facts['os']['family']}/${facts['os']['architecture']}") }
}

Expand Down

0 comments on commit c8bafb7

Please sign in to comment.