Deployment Architecture
Highlighted

docker installed splunkforwarder config help in ansible deployment

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
dockercontainer:
name: splunk
uf
image: "{{ registryurl}}/splunkuniversalforwarder:7.3"
state: started
hostname: "{{ fqdn }}"
volumes:
- /home/app:/home/app
- /var/log:/var/log
published
ports:
- "9997:9997"
env:
SPLUNKSTARTARGS: "--accept-license"
SPLUNKPASSWORD: "{{ splunkforwarder_password }}"

SPLUNKDEPLOYMENTSERVER: "{{ splunkdepserv }}"*

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