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!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...