Hi, Because you don’t use the right name…
file {'/test': ensure => directory, alias => 'abc', } file {'/test/2': ensure => directory, require => File['/test'], } Regards, 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 Josh Cooper Envoyé : 10 janvier, 2017 14:21 À : puppet-users@googlegroups.com Objet : Re: [Puppet Users] Could not find resource, but it's there. On Mon, Jan 9, 2017 at 2:56 AM, Henrik Lindberg <henrik.lindb...@puppet.com<mailto:henrik.lindb...@puppet.com>> wrote: On 09/01/17 02:52, chris smith wrote: Hi, This seems like a pretty simple thing but I can't figure out why this is throwing a warning. I'm using puppet 4.8.1 installed from the puppetlabs-pc1 on scientific linux 6. # puppet -V 4.8.1 # rpm -q puppet-agent puppet-agent-1.8.2-1.el6.x86_64 My file is as simple as I can make it: file {'/test': ensure => directory, alias => 'abc', } file {'/test/2': ensure => directory, require => File['abc'], } When I run it, it complains: # puppet apply test.pp Warning: Could not find resource 'File[abc]' in parameter 'require' (at /root/test.pp:8) Notice: Compiled catalog for sl-x86-64.local in environment production in 0.10 seconds Notice: /Stage[main]/Main/File[/test]/ensure: created Notice: /Stage[main]/Main/File[/test/2]/ensure: created Notice: Applied catalog in 0.04 seconds Though it seems to apply the resources in the correct order (I haven't had it fail trying to create /test/2 before /test). Any info or ideas would be great. The reason it works is because the default ordering is "manifest order" and your manifest has the resources in the correct order. The reference File['abc'] does not succeed because 'abc' is an alias, and not the title - I believe there is a ticket about that already logged. Filed as https://tickets.puppetlabs.com/browse/PUP-6984 - henrik -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blogspot.se/ -- 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%2bunsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1d0fd21d-f1a2-5f41-b53d-b0de9c4873f8%40puppet.com. For more options, visit https://groups.google.com/d/optout. -- Josh Cooper Developer, Puppet -- 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/CA%2Bu97ukjvHzs1rcu4qb55VYeMy8DnyFX6L0Wihfx0FyVvrcWkQ%40mail.gmail.com<https://groups.google.com/d/msgid/puppet-users/CA%2Bu97ukjvHzs1rcu4qb55VYeMy8DnyFX6L0Wihfx0FyVvrcWkQ%40mail.gmail.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/C2F62CDF5915D0458F0528664315BAE764860101%40WMAIPDC06P.le500.loto-quebec.com. For more options, visit https://groups.google.com/d/optout.