Skip to content

Commit

Permalink
Add splunk_skip_repo option to ansible (open-telemetry#2249)
Browse files Browse the repository at this point in the history
* Add sfx_skip_repo option to ansible

* rename sfx_skip_repo to splunk_skip_repo, add the when clause to debian installs as well, add more documentation

Co-authored-by: asavenko <asavenko@redhat.com>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>
  • Loading branch information
3 people authored Nov 28, 2022
1 parent 203d083 commit 7d15fce
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployments/ansible/roles/collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ $> ansible-playbook playbook.yaml -e start_service=false
- `splunk_ballast_size_mib`: Memory ballast size in MiB that will be set to the Splunk
OTel Collector. (**default:** 1/3 of `splunk_memory_total_mib`)
- `splunk_skip_repo` (Linux only): If installing the collector from a custom or self-hosted
apt/yum repo, set to `true` to skip the installation of the default repo
(**default:** `false`)
- `start_service`: Whether to restart the services installed by the playbook. (**default:** true)
#### Windows Proxy
Expand Down
3 changes: 3 additions & 0 deletions deployments/ansible/roles/collector/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ install_fluentd: true
# Whether to start the services installed by the role (splunk-otel-collector and td-agent).
start_service: true

# Disable setting the official Splunk Debian or RPM repository.
splunk_skip_repo: false

# Explicitly set version of td-agent,
# By default: 3.7.1 for Debian stretch and 4.3.2 for other distros.
td_agent_version: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
repo: "deb {{ splunk_repo_base_url }}/otel-collector-deb release main"
filename: splunk-otel-collector.list
state: present
when: not (splunk_skip_repo | bool)

- name: Install Splunk OpenTelemetry Collector via apt package manager
ansible.builtin.apt:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
gpgkey: "{{ splunk_repo_base_url }}/otel-collector-rpm/splunk-B3CD4420.pub"
gpgcheck: yes
enabled: yes
when: not (splunk_skip_repo | bool)

- name: Install Splunk OpenTelemetry Collector via yum package manager
ansible.builtin.yum:
Expand Down

0 comments on commit 7d15fce

Please sign in to comment.