From 09bb94d7a6c855ac9c0a426413c5cf912870463a Mon Sep 17 00:00:00 2001 From: Vincent Tamet Date: Tue, 24 Jun 2025 18:24:32 +0200 Subject: [PATCH] Fix legacy facts --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f95ed6e..7a75882 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,15 @@ datacat { '/etc/nagios/objects/hostgroups.cfg': template => "${module_name}/hostgroups.cfg.erb", } -datacat_fragment { "${::fqdn} in device hostgroup": +datacat_fragment { "${facts['networking']['fqdn']} in device hostgroup": target => '/etc/nagios/objects/hostgroups.cfg', data => { - device => [ $::fqdn ], + device => [ $facts['networking']['fqdn'] ], }, } # fred.dc1.notreal has an ilo fred-ilo.dc1.notreal -$ilo_fqdn = regsubst($::fqdn, '\.', '-ilo.') +$ilo_fqdn = regsubst($facts['networking']['fqdn'], '\.', '-ilo.') datacat_fragment { "${ilo_fqdn} in device hostgroup": target => '/etc/nagios/objects/hostgroups.cfg', data => {