|
1 | 1 | --- |
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 }}" |
6 | 8 | owner: "{{ splunk_nix_user }}" |
7 | 9 | group: "{{ splunk_nix_group }}" |
| 10 | + mode: 0644 |
8 | 11 | become: true |
9 | 12 | 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' |
| 27 | + |
| 28 | +- name: Configure phoneHomeIntervalInSecs in deploymentclient.conf |
| 29 | + ini_file: |
| 30 | + path: "{{ splunk_home }}/etc/system/local/deploymentclient.conf" |
| 31 | + section: deployment-client |
| 32 | + option: phoneHomeIntervalInSecs |
| 33 | + value: "{{ phoneHomeIntervalInSecs }}" |
| 34 | + owner: "{{ splunk_nix_user }}" |
| 35 | + group: "{{ splunk_nix_group }}" |
| 36 | + mode: 0644 |
| 37 | + become: true |
| 38 | + notify: restart splunk |
| 39 | + when: phoneHomeIntervalInSecs != 'undefined' |
| 40 | + |
| 41 | +- name: Configure deployment server pass4SymmKey in server.conf |
| 42 | + ini_file: |
| 43 | + path: "{{ splunk_home }}/etc/system/local/server.conf" |
| 44 | + section: deployment |
| 45 | + option: pass4SymmKey |
| 46 | + value: "{{ splunk_ds_key }}" |
| 47 | + owner: "{{ splunk_nix_user }}" |
| 48 | + group: "{{ splunk_nix_group }}" |
| 49 | + mode: 0644 |
| 50 | + become: true |
| 51 | + notify: restart splunk |
| 52 | + when: splunk_ds_key != 'undefined' |
0 commit comments