aboutsummaryrefslogtreecommitdiff
path: root/ansible/plays/otelcol-contrib.yml
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2024-12-23 17:35:29 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2024-12-23 17:35:29 +0100
commite768b1675922e746f09828920b05d836a1cd365b (patch)
tree505560f6c972b802e94a4bff1ec2e3e641a37fda /ansible/plays/otelcol-contrib.yml
parent979ec08d3d35118f106559dc59c1961cd3534ba7 (diff)
downloadinfra-e768b1675922e746f09828920b05d836a1cd365b.tar.gz
infra-e768b1675922e746f09828920b05d836a1cd365b.tar.bz2
infra-e768b1675922e746f09828920b05d836a1cd365b.tar.xz
infra-e768b1675922e746f09828920b05d836a1cd365b.zip
otelcolHEADmaster
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