Deployment Architecture

docker installed splunkforwarder config help in ansible deployment

Telstra_rdavis
New Member

I have a SUF installed in a docker container and all works OK It is deployed via Ansible. A snip of my Ansible playbook:
*- name: Start Splunk Forwarder container
docker_container:
name: splunk_uf
image: "{{ registry_url}}/splunkuniversalforwarder:7.3"
state: started
hostname: "{{ fqdn }}"
volumes:
- /home/app:/home/app
- /var/log:/var/log
published_ports:
- "9997:9997"
env:
SPLUNK_START_ARGS: "--accept-license"
SPLUNK_PASSWORD: "{{ splunk_forwarder_password }}"

SPLUNK_DEPLOYMENT_SERVER: "{{ splunk_dep_serv }}"*

It builds a deploymentclient.conf file like this:
*[target-broker:deploymentServer]

targetUri = deploymentserver.com:8089*

My splunk guys say it needs to be like this:
*[target-broker:deploymentServer]
targetUri = deploymentserver.com:8089
[deployment-client]
clientName = SPLUNK-APP-NET-$HOSTNAME

disabled=false*

So my question is:
How do I get the [deployment-client] part of the file built with my Ansible playbook?

Thanks in advance,
Rob

0 Karma

DevProfile101
Loves-to-Learn

From your ansible playbook create a new play that will execute a script and the script will append the configuration to deploymentclient.conf 

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...