Skip to content

Commit bd45395

Browse files
committed
install collector via local package on Suse and RedHat
1 parent 5629283 commit bd45395

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

deployments/ansible/roles/collector/tasks/apt_install_otel_collector.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- gnupg
99
state: present
1010
update_cache: yes
11+
when: not install_local_artifact
1112

1213
- name: Download an apt signing key for Splunk OpenTelemetry Collector
1314
ansible.builtin.get_url:
@@ -34,7 +35,7 @@
3435
- "restart td-agent"
3536
when: not install_local_artifact
3637

37-
- name: Install Splunk OpenTelemetry Collector via local artifact (arm64)
38+
- name: Install Splunk OpenTelemetry Collector via local DEB artifact
3839
ansible.builtin.apt:
3940
deb: /tmp/deb-{{ ansible_facts.ansible_architecture }}-package
4041
notify:

deployments/ansible/roles/collector/tasks/yum_install_otel_collector.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
name: "libcap"
77
state: present
88
update_cache: yes
9+
when: not install_local_artifact
910

1011
- name: Add Splunk OpenTelemetry Collector repo to yum source list
1112
ansible.builtin.yum_repository:
@@ -15,7 +16,7 @@
1516
gpgkey: "{{ splunk_repo_base_url }}/otel-collector-rpm/splunk-B3CD4420.pub"
1617
gpgcheck: yes
1718
enabled: yes
18-
when: not (splunk_skip_repo | bool)
19+
when: not (splunk_skip_repo | bool) and not install_local_artifact
1920

2021
- name: Install Splunk OpenTelemetry Collector via yum package manager
2122
ansible.builtin.yum:
@@ -27,3 +28,12 @@
2728
notify:
2829
- "restart splunk-otel-collector"
2930
- "restart td-agent"
31+
when: not install_local_artifact
32+
33+
- name: Install Splunk OpenTelemetry Collector via local RPM artifact
34+
ansible.builtin.yum:
35+
name: /tmp/rpm-{{ ansible_facts.ansible_architecture }}-package
36+
notify:
37+
- "restart splunk-otel-collector"
38+
- "restart td-agent"
39+
when: install_local_artifact

deployments/ansible/roles/collector/tasks/zypper_install_otel_collector.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@
66
name: "libcap-progs"
77
state: present
88
update_cache: yes
9+
when: not install_local_artifact
910

1011
- name: Import the Splunk GPG key
1112
ansible.builtin.rpm_key:
1213
state: present
1314
key: "{{ splunk_repo_base_url }}/otel-collector-rpm/splunk-B3CD4420.pub"
14-
when: not (splunk_skip_repo | bool)
15+
when: not (splunk_skip_repo | bool) and not install_local_artifact
1516

1617
- name: Add Splunk OpenTelemetry Collector repo to zypper source list
1718
ansible.builtin.template:
1819
src: collector-zypper.repo.j2
1920
dest: /etc/zypp/repos.d/splunk-otel-collector.repo
20-
when: not (splunk_skip_repo | bool)
21+
when: not (splunk_skip_repo | bool) and not install_local_artifact
2122

2223
- name: Install Splunk OpenTelemetry Collector via zypper package manager
2324
community.general.zypper:
@@ -28,3 +29,11 @@
2829
update_cache: yes
2930
notify:
3031
- "restart splunk-otel-collector"
32+
when: not install_local_artifact
33+
34+
- name: Install Splunk OpenTelemetry Collector via local RPM artifact
35+
community.general.zypper:
36+
name: /tmp/rpm-{{ ansible_facts.ansible_architecture }}-package
37+
notify:
38+
- "restart splunk-otel-collector"
39+
when: install_local_artifact

0 commit comments

Comments
 (0)