On 15 Aug 2012, at 23:58, Douglas Garstang wrote:
> On Wed, Aug 15, 2012 at 2:55 PM, Ryan Coleman <[email protected]> wrote:
>> On Wed, Aug 15, 2012 at 2:51 PM, Douglas Garstang
>> <[email protected]> wrote:
>>> How do I get get length of an array in puppet DSL?
>>
>> Hi Doug,
>>
>> You can install the puppetlabs-stdlib module from the Forge and use
>> the size function.
>>
>
> Ryan,
>
> No thanks. I've stopped using 3rd party modules. Providers don't work
> with environments... at least I don't think they do.... no has has
> provided a definitive answer.
Could you elaborate on this one?
I'm using the stdlib with environments. Never ran into any issues with that.
> Thought this might work...
>
> $foo = inline_template("<%= [$pvdisks[ %>.length")
>
> but that gives meerr: Could not retrieve catalog from remote server:
> Error 400 on SERVER: compile error
> (erb):1: unknown regexp options - vdb
> (erb):1: syntax error, unexpected tINTEGER, expecting ']'
> ...; _erbout.concat(( [/dev/xvdb1/dev/xvdc1] ).to_s); _erbout.c...
> ^
> (erb):1: syntax error, unexpected ']', expecting ')'
> ...oncat(( [/dev/xvdb1/dev/xvdc1] ).to_s); _erbout.concat ".len...
>
> Yucko.
>
> --
> 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.
>
Regards,
Tom De Vylder
--
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.