-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.yml
44 lines (38 loc) · 1.29 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
# tasks file for kiosk_mode
- name: Ensure hostname set
ansible.builtin.hostname:
name: "{{ inventory_hostname.split('.')[0] }}"
- name: Register as user with password and auto-subscribe to available content.
community.general.redhat_subscription:
state: present
username: "{{ rhsm_username }}"
password: "{{ rhsm_password }}"
auto_attach: true
- name: Check package facts
ansible.builtin.package_facts:
# Project packages are not signed
- name: Install Open Telemetry Collector
ansible.builtin.dnf:
name:
- https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.114.0/otelcol-contrib_0.114.0_linux_amd64.rpm
state: present
disable_gpg_check: true
when:
- ansible_facts['packages']['otelcol-contrib'] is not defined
- name: Manage drop-in to run as root
ansible.builtin.include_tasks: dropin.yml
- name: Manage OTEL Config
ansible.builtin.template:
src: config.yml.j2
#dest: /etc/opentelemetry-collector/configs/01-federated-edge-observability.yaml
dest: /etc/otelcol-contrib/config.yaml
owner: root
group: root
mode: "0644"
notify: "restart otel-collector"
- name: Manage OTEL Service
ansible.builtin.service:
name: "{{ otel_collector_service_name }}"
state: started
enabled: true