aboutsummaryrefslogtreecommitdiff
path: root/ansible/plays/otelcol-contrib.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/plays/otelcol-contrib.yml')
-rw-r--r--ansible/plays/otelcol-contrib.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/ansible/plays/otelcol-contrib.yml b/ansible/plays/otelcol-contrib.yml
new file mode 100644
index 0000000..f667337
--- /dev/null
+++ b/ansible/plays/otelcol-contrib.yml
@@ -0,0 +1,29 @@
+- hosts:
+ - coregonus
+ - hash
+ - knot
+ tasks:
+
+ # otelcol-contrib.deb needs to be installed first
+ # adduser otelcol-contrib systemd-journal
+
+ - name: /etc/otelcol-contrib/config.yaml
+ become: yes
+ template:
+ src: otelcol-contrib/config.yaml
+ dest: /etc/otelcol-contrib/config.yaml
+ notify: systemctl restart otelcol-contrib
+
+ - name: mkdir /var/lib/otelcol/file_storage
+ become: yes
+ file:
+ path: /var/lib/otelcol/file_storage
+ owner: otelcol-contrib
+ notify: systemctl restart otelcol-contrib
+
+ handlers:
+ - name: systemctl restart otelcol-contrib
+ become: yes
+ systemd:
+ service: otelcol-contrib
+ state: restarted