Skip to content

add support for automated splunk update when new version is available - #97

Open
asifulhaque786 wants to merge 1 commit into
masterfrom
automate-splunk-update
Open

add support for automated splunk update when new version is available#97
asifulhaque786 wants to merge 1 commit into
masterfrom
automate-splunk-update

Conversation

@asifulhaque786

Copy link
Copy Markdown
Member

@asifulhaque786
asifulhaque786 marked this pull request as draft August 31, 2026 05:45
@asifulhaque786 asifulhaque786 changed the title add support for automated splunk update when new version is available… add support for automated splunk update when new version is available Aug 31, 2026
@asifulhaque786
asifulhaque786 force-pushed the automate-splunk-update branch from bf4b4f3 to e4391f5 Compare August 31, 2026 16:02
@asifulhaque786
asifulhaque786 marked this pull request as ready for review September 1, 2026 02:55
@asifulhaque786
asifulhaque786 force-pushed the automate-splunk-update branch 4 times, most recently from fdf046c to b4d3c34 Compare September 1, 2026 04:37
Adds an opt-in auto-upgrade path for the Splunk Universal Forwarder:
leaving version/build unset tracks the latest release via a new
splunk_forwarder_latest_version() function (scraped from Splunk's
download page, cached 6h, with stale-cache/hardcoded fallbacks so a
lookup failure never breaks catalog compilation). Pinning version
requires build to match, enforced by a fail-fast check.

Actually enforcing a resolved version/upgrade required more than the
version/build plumbing:
- package_ensure can't be pinned to a version on dpkg (no 'versionable'
  feature), so version drift is instead detected via the
  splunkforwarder_version fact and handled by purging the old
  package/binary before splunk::forwarder reinstalls - keyed off
  package_provider (dpkg/rpm) rather than os family, since
  splunk::params also maps Solaris/FreeBSD/windows.
- Purging invalidates password::seed's own "is this a first install"
  check (it reads a pre-purge fact), so reset_seeded_password is forced
  during a purge to avoid the interactive admin-account prompt on next
  start.
- The accept-tos exec's default 300s timeout is too short for a fresh
  install's first start; extended to 900s via a resource collector
  override rather than patching the vendored module.
- Service resources now also respect noop_value, consistent with the
  Archive/File/Package/Exec resources this profile already forces real
  regardless of the agent's --noop flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant