Skip to content

Commit 2e7a246

Browse files
author
Mason Morales
committed
Convert deploymentclient.conf from template to ini_file
1 parent 0c3912c commit 2e7a246

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
---
2-
- name: Create deploymentclient.conf config
3-
template:
4-
src: deploymentclient.conf.j2
5-
dest: "{{ splunk_home }}/etc/system/local/deploymentclient.conf"
2+
- name: Configure DS URI in deploymentclient.conf
3+
ini_file:
4+
path: "{{ splunk_home }}/etc/system/local/deploymentclient.conf"
5+
section: 'target-broker:deploymentServer'
6+
option: targetUri
7+
value: "{{ splunk_uri_ds }}"
68
owner: "{{ splunk_nix_user }}"
79
group: "{{ splunk_nix_group }}"
10+
mode: 0644
811
become: true
912
notify: restart splunk
10-
when:
11-
- clientName != 'undefined'
12-
- splunk_uri_ds != 'undefined'
13+
when: splunk_uri_ds != 'undefined'
14+
15+
- name: Configure client name in deploymentclient.conf
16+
ini_file:
17+
path: "{{ splunk_home }}/etc/system/local/deploymentclient.conf"
18+
section: 'deployment-client'
19+
option: clientName
20+
value: "{{ clientName }}"
21+
owner: "{{ splunk_nix_user }}"
22+
group: "{{ splunk_nix_group }}"
23+
mode: 0644
24+
become: true
25+
notify: restart splunk
26+
when: clientName != 'undefined'

roles/splunk/templates/deploymentclient.conf.j2

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)