File tree Expand file tree Collapse file tree 6 files changed +22
-1
lines changed Expand file tree Collapse file tree 6 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 12
12
- ' deployments/ansible/galaxy.yml'
13
13
branches :
14
14
- main
15
+ - ansible-discovery-mode
15
16
pull_request :
16
17
paths :
17
18
- ' .github/workflows/ansible.yml'
Original file line number Diff line number Diff line change 6
6
splunk_access_token : fake-token
7
7
splunk_ingest_url : https://fake-splunk-ingest.com
8
8
splunk_api_url : https://fake-splunk-api.com
9
- splunk_otel_collector_version : 0.48 .0
9
+ splunk_otel_collector_version : 0.63 .0
10
10
splunk_otel_collector_config : /etc/otel/collector/custom_config.yml
11
11
splunk_otel_collector_config_source : ./custom_collector_config.yml
12
12
splunk_service_user : custom-user
20
20
splunk_otel_collector_additional_env_vars :
21
21
MY_CUSTOM_VAR1 : value1
22
22
MY_CUSTOM_VAR2 : value2
23
+ splunk_discovery_mode : yes
23
24
tasks :
24
25
- name : " Include signalfx.splunk_otel_collector.collector role"
25
26
include_role :
Original file line number Diff line number Diff line change 65
65
state : present
66
66
check_mode : yes
67
67
68
+ - name : Assert discovery mode is enabled
69
+ ansible.builtin.lineinfile :
70
+ line : OTELCOL_OPTIONS=--discovery
71
+ dest : /etc/otel/collector/splunk-otel-collector.conf
72
+ state : present
73
+ check_mode : yes
74
+
68
75
- name : Populate package facts
69
76
ansible.builtin.package_facts :
70
77
Original file line number Diff line number Diff line change 56
56
dest : /etc/otel/collector/splunk-otel-collector.conf
57
57
state : present
58
58
check_mode : yes
59
+
60
+ - name : Assert discovery mode is not enabled
61
+ ansible.builtin.lineinfile :
62
+ line : OTELCOL_OPTIONS=--discovery
63
+ dest : /etc/otel/collector/splunk-otel-collector.conf
64
+ state : absent
65
+ check_mode : yes
Original file line number Diff line number Diff line change @@ -96,3 +96,5 @@ signalfx_dotnet_auto_instrumentation_enable_profiler_memory: false
96
96
signalfx_dotnet_auto_instrumentation_global_tags : " "
97
97
signalfx_dotnet_auto_instrumentation_iisreset : true
98
98
signalfx_dotnet_auto_instrumentation_additional_options : {}
99
+
100
+ splunk_discovery_mode : false
Original file line number Diff line number Diff line change @@ -32,3 +32,6 @@ SPLUNK_COLLECTD_DIR={{ splunk_collectd_dir }}
32
32
{{ key }}={{ value }}
33
33
{% endfor %}
34
34
{% endif %}
35
+ {% if splunk_discovery_mode is defined and splunk_discovery_mode %}
36
+ OTELCOL_OPTIONS=--discovery
37
+ {% endif %}
You can’t perform that action at this time.
0 commit comments