Skip to content

Commit

Permalink
prevent adhoc_kill_splunkd.yml when upgrading by default (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
jewnix authored Feb 10, 2023
1 parent df95bf3 commit 6a30f36
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Note: Any task with an **adhoc** prefix means that it can be used independently
- **splunk_restart.yml** - Restarts splunk via the service module. Used when waiting for a handler to run at the end of the play would be inappropriate.
- **splunk_start.yml** - Starts splunk via the service module. Used when waiting for a handler to run at the end of the play would be inappropriate.
- **splunk_stop.yml** - Stops splunk via the service module. Used when waiting for a handler to run at the end of the play would be inappropriate.
- **upgrade_splunk.yml** - *Do not call upgrade_splunk.yml directly! Use check_splunk.yml* - Called by check_splunk.yml. Performs an upgrade of an existing splunk installation. Configures .bash_profile and .bashrc for splunk user (by calling configure_bash.yml), disables THP and increases ulimits (by calling configure_os.yml), kills any stale splunkd processes present (by calling adhoc_kill_splunkd.yml). Note: You should NOT run the upgrade_splunk.yml task directly from a playbook. check_splunk.yml will call upgrade_splunk.yml if it determines that an upgrade is needed; It will then download and unarchive the new version of Splunk (by calling download_and_unarchive.yml), ensure that mongod is in a good stopped state (by calling adhoc_fix_mongo.yml), and will then perform post-installation tasks using the post_install.yml task.
- **upgrade_splunk.yml** - *Do not call upgrade_splunk.yml directly! Use check_splunk.yml* - Called by check_splunk.yml. Performs an upgrade of an existing splunk installation. Configures .bash_profile and .bashrc for splunk user (by calling configure_bash.yml), disables THP and increases ulimits (by calling configure_os.yml), kills any stale splunkd processes present when `splunk_force_kill` is set to `True` (by calling adhoc_kill_splunkd.yml). Note: You should NOT run the upgrade_splunk.yml task directly from a playbook. check_splunk.yml will call upgrade_splunk.yml if it determines that an upgrade is needed; It will then download and unarchive the new version of Splunk (by calling download_and_unarchive.yml), ensure that mongod is in a good stopped state (by calling adhoc_fix_mongo.yml), and will then perform post-installation tasks using the post_install.yml task.

## Frequently Asked Questions
**Q:** What is the difference between this and splunk-ansible?
Expand Down
1 change: 1 addition & 0 deletions roles/splunk/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ splunk_authenticationconf: authentication.conf.j2
splunk_create_polkit: 0 # If set to 1 `enable boot-start` will create a polkit rules file allowing the 'splunk_nix_user' to restart the splunk service without authentication.
splunk_use_initd: false # If set to true, the system will use init.d. Default false
splunk_use_systemd: true # DO NOT EDIT. To use init.d, set `splunk_use_initd` to true.
splunk_force_kill: False
systemd_unit_full: Splunkd # You can change this in `host_vars` or `group_vars` to customize the service name.
systemd_unit_uf: SplunkForwarder # You can change this in `host_vars` or `group_vars` to customize the service name.
splunk_disable_mgmt_port: false # If set to true, will disable splunkd management port during installation
Expand Down
1 change: 1 addition & 0 deletions roles/splunk/tasks/upgrade_splunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

- name: Include task to kill any stale splunkd processes
include_tasks: adhoc_kill_splunkd.yml
when: splunk_force_kill

- name: Include download and unarchive task
include_tasks: download_and_unarchive.yml
Expand Down

0 comments on commit 6a30f36

Please sign in to comment.