Re: [Puppet Users] Variable doesn't expand properly
the background. However, (per orig post) the result of no quotes: ... require = Package[$packagelist], ... was the following : warning: Not using cache on failed catalog ... and the somewhat obscure: warning: Configuration could not be instantiated: wrong number of arguments (3 for 2) I'll keep working with it, meanwhile I've bypassed using an array just to get it going... Hi, while this won't be of much help, I'd just like to add that those requires are spurious. To create a symlink, all puppet requires is the parent directory (/etc/rc.d/init.d/ is present in any case). So from my perspective, it doesn't seem like puppet needs to process the packages or even the link target file before it creates the link. You can safely drop the require parameter. Concerning the original problem - I would be interested whether Package[$packagelist, mimedefang] works better. Regards, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Variable doesn't expand properly
On Tue, Feb 8, 2011 at 7:36 PM, Trevor Vaughan tvaug...@onyxpoint.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Don't put $packagelist in quotes. $packagelist = Array[...] $packagelist = String(packagelist) Thanks; makes sense not to use the quotes, seeing now what goes on in the background. However, (per orig post) the result of no quotes: ... require = Package[$packagelist], ... was the following : warning: Not using cache on failed catalog ... and the somewhat obscure: warning: Configuration could not be instantiated: wrong number of arguments (3 for 2) I'll keep working with it, meanwhile I've bypassed using an array just to get it going... Trevor On 02/08/2011 05:34 PM, John Ingersoll wrote: HI, I'm getting some strange errors when I try to use a variable in a require = Package construct, namely: $packagelist = [clamav, clamd, clamav-db] package { $packagelist: ensure = latest, } # Above apparently works fine... # ...THEN... file { /etc/rc.d/init.d/clamd.mimedefang: ensure = $adminroot/mime-defang/clamd.mimedefang, require = [ File[$adminroot/mime-defang], Package[$packagelist], Package[mimedefang] ], # getting error: quote Configuration could not be instantiated: Could not find dependency Package[clamavclamdclamav-db] for File[/etc/rc.d/init.d/clamd.mimedefang] /quote As you can see, it's running the names together. If I remove the double quotes to be... Package[$packagelist], ...it tells me... quote warning: Not using cache on failed catalog warning: Configuration could not be instantiated: wrong number of arguments (3 for 2) /quote Similar syntax appears to be working fine in another module. What could I be doing wrong? TIA -- John Ingersoll EITS/CSSA University of Georgia, Athens -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJNUeGBAAoJECNCGV1OLcypMi8H/iFJYwDhUPhR6bLEhxClzh6z Ur/s8+feZikU6p30bLEagN/epWBR39878BwZBHES+TfT/PGbCMrv628Zzc/Bkuij EGTdpbO5rqhfojIF/eSDRvoixGgYwJuoTMCU7XFfYdbht9Onr8bXJe5ORYS53QrT +fwXHhbCP+S1H2+gFHqHhAw+FON4lItuYJcobrmhWfe1Rc1vpVIuGOgQdRtiI1Tk bMilJmidVqXY/ClbrKJOmkrRY00+z9ysUtFVoejFZKLkdrp/RZVor2Svl6sZUNVl 2K1uwWg8vnmLPPFovAvAy1H8EG+ebH/DVP8827ujNIl4o6aFCmMVZpeNgb5DWkg= =4TnH -END PGP SIGNATURE- Regards -- John Ingersoll EITS/CSSA University of Georgia, Athens jhijr at uga dot edu -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Variable doesn't expand properly
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Don't put $packagelist in quotes. $packagelist = Array[...] $packagelist = String(packagelist) Trevor On 02/08/2011 05:34 PM, John Ingersoll wrote: HI, I'm getting some strange errors when I try to use a variable in a require = Package construct, namely: $packagelist = [clamav, clamd, clamav-db] package { $packagelist: ensure = latest, } # Above apparently works fine... # ...THEN... file { /etc/rc.d/init.d/clamd.mimedefang: ensure = $adminroot/mime-defang/clamd.mimedefang, require = [ File[$adminroot/mime-defang], Package[$packagelist], Package[mimedefang] ], # getting error: quote Configuration could not be instantiated: Could not find dependency Package[clamavclamdclamav-db] for File[/etc/rc.d/init.d/clamd.mimedefang] /quote As you can see, it's running the names together. If I remove the double quotes to be... Package[$packagelist], ...it tells me... quote warning: Not using cache on failed catalog warning: Configuration could not be instantiated: wrong number of arguments (3 for 2) /quote Similar syntax appears to be working fine in another module. What could I be doing wrong? TIA -- John Ingersoll EITS/CSSA University of Georgia, Athens -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJNUeGBAAoJECNCGV1OLcypMi8H/iFJYwDhUPhR6bLEhxClzh6z Ur/s8+feZikU6p30bLEagN/epWBR39878BwZBHES+TfT/PGbCMrv628Zzc/Bkuij EGTdpbO5rqhfojIF/eSDRvoixGgYwJuoTMCU7XFfYdbht9Onr8bXJe5ORYS53QrT +fwXHhbCP+S1H2+gFHqHhAw+FON4lItuYJcobrmhWfe1Rc1vpVIuGOgQdRtiI1Tk bMilJmidVqXY/ClbrKJOmkrRY00+z9ysUtFVoejFZKLkdrp/RZVor2Svl6sZUNVl 2K1uwWg8vnmLPPFovAvAy1H8EG+ebH/DVP8827ujNIl4o6aFCmMVZpeNgb5DWkg= =4TnH -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. attachment: tvaughan.vcf