Hi, Maybe you can regroup each item with the same configuration, like this:
$file_system_list = [‘/’,’/home’,’/opt’] $file_system_list.each | String $file_system| { file {“$file_system”: ensure => ‘directory’, owner => ‘root’, group => ‘root’ } } Dominique Arpin Tél. Interne: 140-4156 Tél. 514 285.2929 Poste: 140-4156 De : puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] De la part de dkoleary Envoyé : 30 mai, 2016 13:09 À : Puppet Users Objet : [Puppet Users] Multiple resource bodies? Hey; According to the puppet language resource guide at https://docs.puppet.com/puppet/latest/reference/lang_resources_advanced.html: If a resource expression includes more than one resource body, the expression will declare multiple resources of that resource type. (A resource body is a title and a set of attributes; each body must be separated from the next one with a semicolon.) With that, can someone take a peek and tell me what I'm messing up with this manifest? file { default: ensure => 'directory', owner => 'root', group => 'root', ; '/' : mode => '0755' ; '/home' : mode => '0755' ; '/opt' : mode => '0755' ; '/usr' : mode => '0755' ; '/var' : mode => '0755' ; '/tmp' : mode => '1777' ; '/var/tmp' : mode => '1777' ; '/etc/passwd': ensure => 'file', mode => '0644', ; '/etc/group': ensure => 'file', mode => '0644', ; '/etc/shadow': ensure => 'file', mode => '0000', ; '/etc/rc.d/init.d': mode => '0755', recurse => true, ; } I'm not seeing the error; but, when I try to apply it, I get: $ sudo puppet apply ./file.pp Notice: Compiled catalog for node1.olearycomputers.com in environment production in 0.04 seconds Error: Parameter path failed on File[/]: File paths must be fully qualified, not '' at /ignite/dkoleary/mpi_git/puppet/modules/mpicommon/manifests/file.pp:1 Any pointers, greatly appreciated. Doug O'Leary -- 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 puppet-users+unsubscr...@googlegroups.com<mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/f284439e-d1d8-49f0-a77e-d0c07ce61239%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. Mise en garde concernant la confidentialité : Le présent message, comprenant tout fichier qui y est joint, est envoyé à l'intention exclusive de son destinataire; il est de nature confidentielle et peut constituer une information protégée par le secret professionnel. Si vous n'êtes pas le destinataire, nous vous avisons que toute impression, copie, distribution ou autre utilisation de ce message est strictement interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser immédiatement l'expéditeur par retour de courriel et supprimer le courriel. Merci! Confidentiality Warning: This message, including any attachment, is sent only for the use of the intended recipient; it is confidential and may constitute privileged information. If you are not the intended recipient, you are hereby notified that any printing, copying, distribution or other use of this message is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email, and delete it. Thank you! -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/C2F62CDF5915D0458F0528664315BAE760A2217E%40MTL1EXC01.scqmtl.loto-quebec.com. For more options, visit https://groups.google.com/d/optout.