- From: Alex Soto <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: 0.7.14 -> 0.7.16... issues
- Date: Tue, 9 Feb 2010 13:32:05 -0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=AZrvQfnctNEFBM8fT2xXqxSUtFViF4jUNcZBHKuyF4Jyl+zPhrgMrMKTmWdlGKYFt+ RM4nzYQsgh5LKspnQbhiSJnuqgtswDP8XoHmbnfx5v2NZt0BifveAGFU27BtjWFX4ps7 h4kFLxz2Bq8ZAviNyPnJM4Tz422iFPerG4ymM=
I believe a dash is a valid character for an identifier/symbol in ruby
On Feb 9, 2010, at 1:08 PM, dreamcat four wrote:
>
$ ruby -e "puts :snmp-master"
>
-e:1: undefined local variable or method `master' for main:Object
>
(NameError)
>
>
Dont use hyphen (dash) as part of symbol identifiers.
>
it should be safe underscore
>
>
>>> template "/etc/snmp/snmpd.conf" do
>
>>> backup 0
>
>>> mode 0444
>
>>> owner "root"
>
>>> group "root"
>
>>> path "/etc/snmp/snmpd.conf"
>
>>> variables(
>
>>> :community => node[:community][:string],
>
>>> :mrtgserver => "172.16.11.201/32",
>
>>> :opennmsserver => "172.16.11.235/32",
>
>>> :extradisk => node[:community][:disk],
>
>>> - :snmp-master => node[:community][:master],
>
>>> + :snmp_master => node[:community][:master],
Archive powered by MHonArc 2.6.16.