GitHub puppet-splunk
31
31
53
Manage Splunk servers and forwarders using Puppet

Metadata Valid
No translation
Correct Puppet Version Range
Supported Puppet version range is %{PUPPET_VERSION_RANGE}
With Puppet Version Range
Puppet version range is present in requirements in metadata.json
With Operatingsystem Support
No translation
Supports Only Current Centos
No translation
Supports Latest Centos
No translation
Supports Only Current Debian
No translation
Supports Latest Debian
No translation
Supports Only Current Ubuntu
No translation
Supports Latest Ubuntu
No translation
In Modulesync Repo
No translation
In Plumbing
Is in plumbing
Has Secrets
Has a .sync.yml file
Synced
Has a .msync.yml file
Latest Modulesync
No translation
Has Modulesync
Is present in voxpupuli/modulesync_config/managed_modules.yml
Released
Is in modulesync_config and in forge releases.
Reference Dot Md
The repository has a REFERENCE.md. It needs to be generated / puppet-strings documentation is missing.

Open Pull Requests

Add ability to override default-host configuration
tests-fail

Pull Request (PR) description

Add ability to override default-host configuration. The default-host configuration is used to control the "host" property which Splunk will use to identify the forwarder. The current behaviour forces the default-host to match the server's $HOSTNAME. In my environment we prefer to customise this name to identify the region and environment for the forwarder (info we don't normally include in the server's hostname).

The default behaviour is maintained so this shouldn't break any existing setup. It just adds the ability to override it if required.

This Pull Request (PR) fixes the following issues

N/A

adding config option for https
tests-fail

<!--
Thank you for contributing to this project!

-->

Pull Request (PR) description

<!--
Replace this comment with a description of your pull request.
-->

This Pull Request (PR) fixes the following issues

<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->

Read Splunk versions from text file
tests-fail

Pull Request (PR) description

This is to avoid issues with splunk --version waiting on input if the license
has not yet been accepted. See issues
https://github.com/voxpupuli/puppet-splunk/issues/238 and
https://github.com/voxpupuli/puppet-splunk/issues/280.

The code is based on
https://github.com/posteingang/puppet-splunk/commit/09092f64e9fed3bb719d94a5cab101b0ef234775
with minor changes.

This Pull Request (PR) fixes the following issues

Fixes #238
Fixes #280

Add support for FreeBSD
enhancement
needs-work
tests-fail
merge-conflicts

Add support for FreeBSD. Tested on FreeBSD 12.1

WIP: Fix issues 230, 232, 235, and 249
backwards-incompatible
merge-conflicts
needs-feedback
tests-fail
  • Moved defaults to module data, and removed the params class
  • Privatized all splunk::enterprise:: and splunk::forwarder:: install, config, and service classes
  • Added a $release param, which replaces the $version param
    • For ensurable package_providers, the release is used as the Splunk package ensure, if specified
    • The release no longer defaults to a specific version and build, instead, the Splunk package resource defaults ensure to 'installed'
    • Added a Splunk::Release type
  • Added a service_ensure param, per #249
  • Modified splunk*_version facts to be part of splunkforwarder and splunkenterprise fact hashes
  • Removed init.pp, which only served to confuse
  • $[enterprise,forwarder]_package_src and $package_source params renamed to $managed_package_source and $unmanaged_package_source, for clarity
  • Fixed: enterprise and forwarder password classes cross-referenced params

Fixed #230
Fixed #232
Fixed #235
Fixed #249

manage the service
enhancement
needs-tests

This pull request add the option service_ensure, to make it possible to stop the service in case.

Update File tree in Readme
docs
tests-fail

<!--
Thank you for contributing to this project!

-->

Pull Request (PR) description

<!--
The root url is described as puppet:///modules/splunk This means the illustration of the directory structure for the products path starts in the root of the module, which has caused confusion to some users
-->

This Pull Request (PR) fixes the following issues

<!--
Fixes #257
-->

change scope of resource override
tests-fail
merge-conflicts

Pull Request (PR) description

Pull request fixes a resource override scoping issue in splunk::forwarder::install.

When being installed on a machine with no existing installation of the net-tools package, the generic override of::

puppet
Package {
source => $splunk::forwarder::package_provider ? {
'chocolatey' => undef,
default => $splunk::forwarder::manage_package_source ? {
true => pick($_staged_package, $_package_source),
false => $_package_source,
}
},
}

Results in a net-tools resource of:

puppet
package { 'net-tools':
ensure => 'present',
source => $splunk::forwarder::manage_package_source,
before => Package[splunkforwarder],
}

This Pull Request (PR) fixes the following issues

n/a.

implement possibility to manage dependencies or not.
tests-fail

implement the manage_dependencies variable to manage external dependencies for forwarder and entreprise.

Solving issue #275

Fix Idempotence issue for RHEL 7 forwarder install
merge-conflicts
needs-work

I could really use a second pair of 👀 on this. I was sifting through the issues on github for this module and noticed someone having a problem a RHEL 7. While i was not able to reproduce their issue specifically ( i assume it's fixed ) i did notice the idempotence test for the forwarder is failing when run under beaker. I know pretty much nothing about se_linux on RHEL 7 but what i do know is the following attribute on the file resource solves the forwarder idempotence test. Could anyone verify this fix is indeed valid?

FYI. Here is the failing beaker test without this change.

First Run

Info: Loading facts
Info: Loading facts
Warning: /etc/puppetlabs/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
(in /etc/puppetlabs/puppet/hiera.yaml)
Notice: Compiled catalog for rhel-74-x64.attlocal.net in environment production in 0.46 seconds
Info: Applying configuration version '1507523793'
Notice: /Stage[main]/Archive::Staging/File[/opt/staging]/ensure: created
Notice: /Stage[main]/Splunk::Forwarder/Archive[/opt/staging/splunk/splunkforwarder-7.0.0-c8a78efdd40f-linux-2.6-x86_64.rpm]/ensure: download archive from https://download.splunk.com/products/universalforwarder/releases/7.0.0/linux/splunkforwarder-7.0.0-c8a78efdd40f-linux-2.6-x86_64.rpm to /opt/staging/splunk/splunkforwarder-7.0.0-c8a78efdd40f-linux-2.6-x86_64.rpm with cleanup
Notice: /Stage[main]/Splunk::Forwarder/Package[splunkforwarder]/ensure: created
Notice: /Stage[main]/Splunk::Forwarder/Splunkforwarder_input[default_host]/ensure: created
Info: /Stage[main]/Splunk::Forwarder/Splunkforwarder_input[default_host]: Scheduling refresh of Service[splunk]
Notice: /Stage[main]/Splunk::Forwarder/Splunkforwarder_output[tcpout_defaultgroup]/ensure: created
Info: /Stage[main]/Splunk::Forwarder/Splunkforwarder_output[tcpout_defaultgroup]: Scheduling refresh of Service[splunk]
Notice: /Stage[main]/Splunk::Forwarder/Splunkforwarder_output[defaultgroup_server]/ensure: created
Info: /Stage[main]/Splunk::Forwarder/Splunkforwarder_output[defaultgroup_server]: Scheduling refresh of Service[splunk]
Notice: /Stage[main]/Splunk::Forwarder/Splunkforwarder_web[forwarder_splunkd_port]/ensure: created
Info: /Stage[main]/Splunk::Forwarder/Splunkforwarder_web[forwarder_splunkd_port]: Scheduling refresh of Service[splunk]
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/deploymentclient.conf]/ensure: created
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/inputs.conf]/mode: mode changed '0644' to '0600'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/inputs.conf]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/outputs.conf]/mode: mode changed '0644' to '0600'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/outputs.conf]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/web.conf]/mode: mode changed '0644' to '0600'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/web.conf]/seluser: seluser changed 'unconfined_u' to 'system_u'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/limits.conf]/ensure: created
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/server.conf]/ensure: created
Notice: /Stage[main]/Splunk::Platform::Posix/Exec[license_splunkforwarder]/returns: executed successfully
Notice: /Stage[main]/Splunk::Platform::Posix/Exec[enable_splunkforwarder]/returns: executed successfully
Info: /Stage[main]/Splunk::Platform::Posix/Exec[enable_splunkforwarder]: Scheduling refresh of Service[splunk]
Notice: /Stage[main]/Splunk::Virtual/Service[splunk]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Splunk::Virtual/Service[splunk]: Unscheduling refresh on Service[splunk]
Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
Notice: Applied catalog in 10.79 seconds

Second run
```
Info: Loading facts
Info: Loading facts
Warning: /etc/puppetlabs/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
(in /etc/puppetlabs/puppet/hiera.yaml)
Notice: Compiled catalog for rhel-74-x64.attlocal.net in environment production in 0.44 seconds
Info: Applying configuration version '1507523806'
Notice: /Stage[main]/Splunk::Forwarder/File[/opt/splunkforwarder/etc/system/local/server.conf]/seluser: seluser changed 'unconfinedu' to 'systemu'
Notice: Applied catalog in 0.17 seconds

```

refactored splunkforwarder_version fact
tests-fail

<!--
Thank you for contributing to this project!

-->

Pull Request (PR) description

<!--
Replace this comment with a description of your pull request.
-->

This Pull Request (PR) fixes the following issues

<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->

WIP: Add upgrade/version handling for splunkforwarder
enhancement
merge-conflicts
needs-work

This allows upgrading splunkforwarder by bumping version/build passed to this module. As a workaround more or less for https://github.com/voxpupuli/puppet-splunk/issues/125.

Changing the version/build parameters to splunk::params results in:

Notice: /Stage[main]/Splunk::Forwarder/Package[splunkforwarder]/ensure: ensure changed '6.5.1-f74036626f0c' to '6.6.2'

Only implemented for splunkforwarder and tested on CentOS right now. If there's interest I can expand it to support splunk and test on other distributions.

  • Change "ensure" to an explicit version (otherwise only the file in /opt/staging will be added when $version is bumped)
  • Extra handling of accepting the license

ensure => absent for the ftr file might even completely replace Exec['license_splunkforwarder'] eventually (untested, however)

<!--
Thank you for contributing to this project!

-->