Try without creating $service_dir explicitly, SC-2522

Error: Cannot alias File[/opt//telegraf] to ["/opt/telegraf"] at (file: /etc/puppet/cosmos-modules/sunet/manifests/misc/create_dir.pp, line: 33); resource ["File", "/opt/telegraf"] already declared (file: /etc/puppet/modules/eid/manifests/telegraf2.pp, line: 21)
This commit is contained in:
Patrik Holmqvist 2025-03-25 14:54:57 +01:00
parent 45e1755cd7
commit 2adc58c274
Signed by: pahol
GPG key ID: 5D5B0D4E93F77273

View file

@ -18,7 +18,7 @@ class eid::telegraf2 (
$influxdb2_bucket = hiera(influxdb2_bucket,'NOT_SET_IN_HIERA')
$influxdb2_bucket_proxy = hiera(influxdb2_bucket_proxy,'NOT_SET_IN_HIERA')
file {[$service_dir,"${service_dir}/telegraf.conf.d"]: ensure => directory }
file {["${service_dir}/telegraf.conf.d"]: ensure => directory }
concat {"${service_dir}/telegraf.conf":
owner => 'root',
group => 'root',