Attached is a class for vmware guests that i am expanding however i am getting an error when i try to extend the ''require'' parameter on an ''Exec'' to install the tools. The error is err: Could not retrieve configuration: Parameter ''require'' is already set on Exec[setup_vmware_tools] by vmware::guest at /etc/puppet/modules/vmware/manifests/init.pp:22; cannot redefine at /etc/puppet/modules/vmware/manifests/init.pp:28 According to the wiki[1] it should work, unless i am misunderstanding it. Any ideas? Thanks, Ben # rpm -q puppet facter puppet-0.23.2-1.el5 facter-1.3.8-1.el5 [1] http://reductivelabs.com/cgi-bin/puppet.cgi/wiki/LanguageTutorial#classes _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Dec 27, 2007, at 12:15 AM, Ben wrote:> Attached is a class for vmware guests that i am expanding however i > am getting an error when i try to extend the ''require'' parameter on > an ''Exec'' to install the tools. > > The error is > > err: Could not retrieve configuration: Parameter ''require'' is > already set on Exec[setup_vmware_tools] by vmware::guest at > /etc/puppet/modules/vmware/manifests/init.pp:22; cannot redefine at > /etc/puppet/modules/vmware/manifests/init.pp:28 > > According to the wiki[1] it should work, unless i am > misunderstanding it.You can''t set a value twice in the same class. Try using an array on the right of the +>; it should still work. -- To get back my youth I would do anything in the world, except take exercise, get up early, or be respectable. -- Oscar Wilde --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies wrote:> On Dec 27, 2007, at 12:15 AM, Ben wrote: > > >> Attached is a class for vmware guests that i am expanding however i >> am getting an error when i try to extend the ''require'' parameter on >> an ''Exec'' to install the tools. >> >> The error is >> >> err: Could not retrieve configuration: Parameter ''require'' is >> already set on Exec[setup_vmware_tools] by vmware::guest at >> /etc/puppet/modules/vmware/manifests/init.pp:22; cannot redefine at >> /etc/puppet/modules/vmware/manifests/init.pp:28 >> >> According to the wiki[1] it should work, unless i am >> misunderstanding it. >> > > You can''t set a value twice in the same class. Try using an array on > the right of the +>; it should still work. >Luke, I did originally have it with an array and it still failed. Exec["setup_vmware_tools"]{ require +> [ Package["${kernelpackage}-devel"], Package["gcc"] ] } But as you say "You can''t set a value twice in the same class", so the attached class does the job. Double handling but gets the job done. Thanks for you help. Ben _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users