Le 08/04/2024 à 11:01:27+0000, 'Dirk Heinrichs' via Puppet Users a écrit
Hi

> 
> > $group_hosts.each | String $host | {
> >   @@file { "file for ${host}":
> >     ensure => present,
> >     name   => "file for ${host}",
> >     path   => '/etc/something.conf',
> >     tag    => "File for ${host}",
> >     etc.
> >     }
> > }
> 
> You create multiple resources here (one for each host), which ALL try
> to manage the SAME file ("/etc/something.conf"). But one file can only
> be managed by one resource. That needs to be something like

Yes...I know that but I'm also using “@@” who export the file to «others
host». So even I can understand why it's not working I think that would be
nice if it does. 

Be re-reading the doc of file ressource I understand that 

  $namevar = $path

but IMHO it should be

  if $name is underf
    $namevar = $path
  else
    $namevar = $name

I find another solution but it need a little more configuration from the
user of the module. 

> 
> HTH...

Thanks. 

Regards. 

-- 
Albert SHIH 🦫 🐸
France
Heure locale/Local time:
lun. 08 avril 2024 13:36:58 CEST

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ZhPX7R9vY9Lsv4ON%40io.chezmoi.fr.

Reply via email to