From fc45a0165680e10fe5851281becda7fadb663b5d Mon Sep 17 00:00:00 2001 From: Patrik Holmqvist Date: Tue, 25 Mar 2025 15:02:50 +0100 Subject: [PATCH] Try rearrange order in attempt to make dir creation work, SC2522 --- .../etc/puppet/modules/eid/manifests/telegraf2.pp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp index 20bad5c1..87195d1d 100644 --- a/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp +++ b/global/overlay/etc/puppet/modules/eid/manifests/telegraf2.pp @@ -18,6 +18,14 @@ class eid::telegraf2 ( $influxdb2_bucket = hiera(influxdb2_bucket,'NOT_SET_IN_HIERA') $influxdb2_bucket_proxy = hiera(influxdb2_bucket_proxy,'NOT_SET_IN_HIERA') + sunet::docker_compose { 'telegraf': + content => template('eid/telegraf2/docker-compose.yml.erb'), + service_name => 'telegraf', + compose_dir => '/opt/', + compose_filename => 'docker-compose.yml', + description => 'telegraf' + } + file {["${service_dir}/telegraf.conf.d"]: ensure => directory } concat {"${service_dir}/telegraf.conf": owner => 'root', @@ -45,11 +53,4 @@ class eid::telegraf2 ( } } - sunet::docker_compose { 'telegraf': - content => template('eid/telegraf2/docker-compose.yml.erb'), - service_name => 'telegraf', - compose_dir => '/opt/', - compose_filename => 'docker-compose.yml', - description => 'telegraf' - } }