Skip to content

Commit bae4ed0

Browse files
committed
merged master
2 parents e1bf314 + ac557d4 commit bae4ed0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+383
-87
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ Note: Any task with an **adhoc** prefix means that it can be used independently
132132
- **adhoc_fix_server_certificate.yml** - Use to delete an expired server.pem and generate a new one (default certs). Useful if your server.pem certificate has expired and you are using Splunk's default certificate for splunkd. Note that default certificates present a security risk and that their use should be avoided, if possible.
133133
- **adhoc_kill_splunkd.yml** - Some releases of Splunk have a "feature" that leaves zombie splunkd processes after a 'splunk stop'. Use this task after a 'splunk stop' to make sure that it's really stopped. Useful for upgrades on some of the 7.x releases, and automatically called by the upgrade_splunk.yml task.
134134
- **check_splunk.yml** - Check if Splunk is installed. If Splunk is not installed, it will be installed on the host. If Splunk is already installed, the task will execute a "splunk version" command on the host, and then compare the version and build number of Splunk to the version and build number of the expected version of Splunk. Note that the expected version of Splunk does not need to be statically defined; The expected Splunk version and build are automatically extracted from the value of splunk_package_url_full or splunk_package_url_uf using Jinja regex filters. This task will work for both the Universal Forwarder and full Splunk Enterprise packages. You define which host uses what package by organizing it under the appropriate group ('full' or 'uf') in your Ansible inventory.
135+
- **check_decrypted_secret.yml** - Check the decrypted value of a given `pass4SymmKey`. This can be called by a task to compare the desired value with the currently configured value to see if they match. This pervents unnessecary changes to be applied.
135136
- **configure_apps.yml** - This task should be called directly from a playbook in order to deploy apps or configurations (from git repositories) to Splunk hosts. Tip: Add a this task to a playbook after the check_splunk.yml play. Doing so will perform a "install (or upgrade) and deploy apps" run, all in one playbook.
137+
- **configure_auditd.yml** - Configure auditd filtering rules to exclude splunk launched executables. Disabled by default, but can be enabled by setting `splunk_auditd_configure` to `true`.
136138
- **configure_authentication.yml** - Uses the template identified by the `splunk_authenticationconf` variable to install an authentication.conf file to $SPLUNK_HOME/etc/system/local/authentication.conf. We are including this task here since Ansible is able to securely deploy an authentication.conf configuration by using ansible-vault to encrypt sensitive values such as the value of the `ad_bind_password` variable. Note: If you are using a common splunk.secret file, you can omit this task and instead use configure_apps.yml to deploy an authentication.conf file from a Git repository containing an authentication.conf app with pre-hashed credentials.
137139
- **configure_bash.yml** - Configures bashrc and bash_profile files for the splunk user. Please note that the templates included with this role will overwrite any existing files for the splunk user (if they exist). The templates will define a custom PS1 at the bash prompt, configure the $SPLUNK_HOME environment variable so that you can issue "splunk <command>" without specifying the full path to the Splunk binary, and will enable auto-completion of Splunk CLI commands in bash.
138140
- **configure_deploymentclient.yml** - Generates a new deploymentclient.conf file from the deploymentclient.conf.j2 template and installs it to $SPLUNK_HOME/etc/system/local/deploymentclient.conf. This task is included automatically during new installations when values have been configured for the `clientName` and `splunk_uri_ds` variables.
@@ -168,7 +170,7 @@ Note: Any task with an **adhoc** prefix means that it can be used independently
168170
- **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.
169171
- **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.
170172
- **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.
171-
- **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.
173+
- **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.
172174

173175
## Frequently Asked Questions
174176
**Q:** What is the difference between this and splunk-ansible?

environments/EAV/group_vars/all.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
splunk_uri_lm: https://splunk-cm.5minfo.it:8089
3+
ansible_user: user
4+
ansible_ssh_private_key_file: ~/.ssh/id_rsa
5+
#git_server: ssh://git@mygithost:1234
6+
#git_key: ~/.ssh/my-git-key
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
splunk_uri_ds: splunk-sd:8089
3+
splunk_firewall_ports:
4+
- "{{ splunkapi_port }}"
5+
- "{{ splunktcpin_port }}"
6+
- "{{ splunkhec_port }}"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
splunk_uri_ds: splunk-sd:8089
3+
splunk_firewall_ports:
4+
- "{{ splunkapi_port }}"
5+
- "{{ splunktcpin_port }}"
6+
- "{{ splunkhec_port }}"
7+
# - "{{ splunkidxcrep_port }}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
splunk_firewall_ports:
3+
- "{{ splunkweb_port }}"
4+
- "{{ splunkapi_port }}"
5+
- "{{ splunkshcrep_port }}"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
splunk_uri_ds: splunk-sd:8089

environments/EAV/inventory.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
# YAML format inventory with nested groups for variable inheritance
3+
# Mason Morales, Splunk, Inc.
4+
# References:
5+
# https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
6+
# Read this: https://docs.ansible.com/ansible/2.9/plugins/inventory/yaml.html
7+
# https://www.digitalocean.com/community/tutorials/how-to-manage-multistage-environments-with-ansible
8+
# ##########################################################################
9+
all:
10+
children:
11+
12+
full:
13+
children:
14+
15+
licensemaster:
16+
hosts:
17+
splunk-cm:
18+
19+
deploymentserver:
20+
hosts:
21+
splunk-sd:
22+
23+
dmc:
24+
hosts:
25+
splunk-cm:
26+
27+
shdeployer:
28+
hosts:
29+
splunk-cm:
30+
vars:
31+
target_shc_group_name: eav_shc
32+
33+
search:
34+
children:
35+
#off# splunk-sh1:
36+
eav_shc:
37+
hosts:
38+
splunk-sh1:
39+
splunk-sh2:
40+
splunk-sh3:
41+
42+
indexer:
43+
hosts:
44+
splunk-idx1:
45+
splunk-idx2:
46+
47+
heavyforwarder:
48+
hosts:
49+
splunk-hf:
50+
51+
#off# standalone:
52+
#off# hosts:
53+
#off# my-standalone-splunk-server:
54+
#off# my-other-standalone-splunk-server:
55+
56+
#off# uf:
57+
#off# children:
58+
59+
#off# vmware:
60+
#off# hosts:
61+
#off# my-vm-ware-host-[001:100]:
62+
#off# vars:
63+
#off# clientName: vmware # Or create a "vmware.yml" file under group_vars and assign clientName there, either works
64+
65+
#off# web:
66+
#off# hosts:
67+
#off# my-web-host-[01-05]:

0 commit comments

Comments
 (0)