-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I don't think that ruby itself allows variables with dashes in the name since it will probably interpret them as minus signs and try to interpret the variables around the symbol.
Trevor
On 05/06/2010 07:31 PM, donavan wrote:
> Am I missing some clever way to use variables containing a dash in the
> name?
>
> We're using LDAP nodes I may have a node like this example:
>
> dn: cn=ns01.domain.com,cn=machines,o=domain
> cn: ns01.domain.com
> objectClass: top
> objectClass: puppetClient
> ipHostNumber: 192.201.112.90
> parentnode: basenode-without-autofs
> puppetclass: default_access
> console-port: 7...@cyclada4
>
> And I'd like to access 'console-port' as a variable in a manifest. In
> ruby land I end up resorting to stupid tricks like
> instance_variable_get('@console-port') or ['console-port'] to get
> this.
>
> Any suggestions besides a hackier implementation of get_var() function?
>
- --
Trevor Vaughan
Vice President, Onyx Point, Inc.
email: [email protected]
phone: 410-541-ONYX (6699)
pgp: 0x6C701E94
- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkvjYvoACgkQyWMIJmxwHpTm9ACeO7bvFMVPYLaIRi9mOjZvPOPA
TYAAn03GCbYaC+5kr/AogVsJ7o12dNLd
=aaay
-----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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
<<attachment: tvaughan.vcf>>
