Running Playbooks - my2ndhead/ansible_playbook_splunk GitHub Wiki

How to Run Playbooks

Installation Preparation

Setup Repository

$ ansible-playbook -i hosts configure_repository.yml

Download Splunk

$ ansible-playbook -i hosts download_splunk.yml

Install Splunk

Install on all Hosts

$ ansible-playbook -i hosts install_splunk.yml 

Install on one Host

$ ansible-playbook -i hosts --limit <hostname> install_splunk.yml 

Note: Installation of Splunk requires remote root rights. It maybe necessary to specify e.g. --become-method

Deploy Configuration (with optional Splunk restart)

Configure License Master

$ ansible-playbook -i hosts configure_licensemaster.yml [ -e "splunk_restart=true" ]

Configure Search Peer

$ ansible-playbook -i hosts configure_searchpeer.yml [ -e "splunk_restart=true" ]

Configure Search Head

$ ansible-playbook -i hosts configure_searchHead.yml [ -e "splunk_restart=true" ]

Configure Peer Node

$ ansible-playbook -i hosts configure_peernode.yml [ -e "splunk_restart=true" ]

Configure Master Node

$ ansible-playbook -i hosts configure_masternode.yml [ -e "splunk_restart=true" ]

Configure Deployer

$ ansible-playbook -i hosts configure_deployer.yml [ -e "splunk_restart=true" ]

Initial Configuration of Search Head Cluster Member

$ ansible-playbook -i hosts install_shcmember.yml 

Configure Search Head Cluster Member

$ ansible-playbook -i hosts configure_shcmember.yml [ -e "splunk_restart=true" ]

Configure Deployment Server

$ ansible-playbook -i hosts configure_deploymentserver.yml [ -e "splunk_restart=true" ]

Configure Distributed Management Console

$ ansible-playbook -i hosts configure_dmc.yml [ -e "splunk_restart=true" ]

Configure Heavy Forwarder

$ ansible-playbook -i hosts configure_heavyforwarder.yml [ -e "splunk_restart=true" ]

Deploy Apps

Deploy all apps without refresh

$ ansible-playbook -i hosts deploy_apps.yml

Deploy all apps with reload deploy-server / apply cluster-bundle / apply shcluster bundle

ansible-playbook -i hosts deploy_apps.yml \
-e "splunk_reload_deploy_server=true"  \
-e "splunk_apply_cluster_bundle=true" \
-e "splunk_apply_shcluster_bundle=true"

Note: deploy_apps.yml will ask for a Splunk Admin Username and Password. Leave empty if you don't use the "-e" options.

⚠️ **GitHub.com Fallback** ⚠️