Hi, I''m exploring Puppet and have hit a rather weird problem. The puppetmaster server is running CentOS4, fully updated, with puppet installed from the dlutter RPM repo, version 0.20.0-1.el4. I tried adding the remotefile function definition from http://reductivelabs.com/projects/puppet/documentation/installation.html in /etc/puppet/manifests/utils/remotefile.pp but when I start puppetmasterd I get: riffraff:brown /etc/puppet/manifests/utils $ sudo /usr/sbin/puppetmasterd --verbose info: Starting server for Puppet version 0.20.0 undefined method `value'' for "owner":String in file /etc/puppet/manifests/utils/remotefile.pp at line 1 The function definition is: define remotefile(owner = root, server = puppet, group = root, mode, source, backup = false, recurse = false) { file { $name: mode => $mode, owner => $owner, group => $group, backup => $backup, source => "puppet://$server/dist/$source" } } which is straight from the installation.html web page. Something is obviously wonky, but I can''t tell what, and appreciate any feedback on this I might get. --[Lance] -- Celebrate The Circle http://www.celebratethecircle.org/ Carolina Spirit Quest http://www.carolinaspiritquest.org/ My LiveJournal http://www.livejournal.com/users/labrown/ GPG Fingerprint: 409B A409 A38D 92BF 15D9 6EEE 9A82 F2AC 69AC 07B9 CACert.org Assurer
On Nov 6, 2006, at 4:28 PM, Lance A. Brown wrote:> Hi, > > I''m exploring Puppet and have hit a rather weird problem. > > The puppetmaster server is running CentOS4, fully updated, with puppet > installed from the dlutter RPM repo, version 0.20.0-1.el4. > > I tried adding the remotefile function definition from > http://reductivelabs.com/projects/puppet/documentation/ > installation.html > in /etc/puppet/manifests/utils/remotefile.pp but when I start > puppetmasterd I get: > > riffraff:brown /etc/puppet/manifests/utils $ sudo > /usr/sbin/puppetmasterd --verbose > info: Starting server for Puppet version 0.20.0 > undefined method `value'' for "owner":String in file > /etc/puppet/manifests/utils/remotefile.pp at line 1Yay. You''re using deprecated syntax, but it''s my fault because I haven''t updated the docs. This code works fine with correct syntax, but (not surprisingly) I didn''t test the deprecated syntax. The way to fix this is to add a ''$'' character to the variable names in the prototype; e.g.: define remotefile($owner = root, $server = puppet,...) Please let me know if that does not fix it. -- Luke Kanies http://madstop.com | http://reductivelabs.com | 615-594-8199
Luke Kanies said the following on 11/6/2006 6:35 PM:> Yay. You''re using deprecated syntax, but it''s my fault because I > haven''t updated the docs. This code works fine with correct syntax, > but (not surprisingly) I didn''t test the deprecated syntax. > > The way to fix this is to add a ''$'' character to the variable names > in the prototype; e.g.: > > define remotefile($owner = root, $server = puppet,...) > > Please let me know if that does not fix it. >Unsurprisingly, that did the trick. :-) --[Lance] -- Celebrate The Circle http://www.celebratethecircle.org/ Carolina Spirit Quest http://www.carolinaspiritquest.org/ My LiveJournal http://www.livejournal.com/users/labrown/ GPG Fingerprint: 409B A409 A38D 92BF 15D9 6EEE 9A82 F2AC 69AC 07B9 CACert.org Assurer