Perfect!!!  Thank you Martin.

On Saturday, February 29, 2020 at 3:49:04 PM UTC, Martin Alfke wrote:
>
> Sorry. wrong function: 
>
> content => $set.join("\n") 
>
> hth, 
> martin 
>
>
> > On 29. Feb 2020, at 15:56, Dan Crisp <[email protected] <javascript:>> 
> wrote: 
> > 
> > Thanks for the respone Martin.  Unfortunately that made no difference. 
>  Still only end up with one line. 
> > 
> > Thanks, 
> > Dan. 
> > 
> > On Saturday, February 29, 2020 at 2:44:38 PM UTC, Martin Alfke wrote: 
> > AFAIK content expects a string. 
> > Maybe you can try 
> > 
> > content => $set.flatten 
> > 
> > hth, 
> > martin 
> > 
> > 
> > > On 29. Feb 2020, at 14:42, Dan Crisp <[email protected]> wrote: 
> > > 
> > > Hi, 
> > > 
> > > Attempting to popualte a file with a hiera array.   
> > > 
> > > I have the following hiera defined: 
> > > 
> > > # more common.yaml 
> > > vimrc: 
> > >   - 'syntax on' 
> > >   - 'colo delek' 
> > >   - 'set nu' 
> > >   - 'set cursorline' 
> > >   - 'set history=1000' 
> > >   - 'set showmode' 
> > >   - 'set showcmd' 
> > > 
> > > Puppet lookup seems to return what I expect to see: 
> > > 
> > > # puppet lookup vimrc 
> > > --- 
> > > - syntax on 
> > > - colo delek 
> > > - set nu 
> > > - set cursorline 
> > > - set history=1000 
> > > - set showmode 
> > > - set showcmd 
> > > 
> > > Here's how I'm call the hiera array: 
> > > 
> > > class base::vim { 
> > > 
> > >   $set = lookup('vimrc', Array[String]) 
> > > 
> > >   package { 'vim': ensure => installed, } 
> > > 
> > >   file { '/root/.vimrc': 
> > >     owner    => root, 
> > >     group    => root, 
> > >     mode     => '0644', 
> > >     content  => $set, 
> > >   } 
> > > 
> > > } 
> > > 
> > > However I just end up with the last line of the arrary: 
> > > 
> > > # more .vimrc 
> > > set showcmd 
> > > 
> > > Any help here would be greatly appreciated. 
> > > 
> > > Thanks, 
> > > Dan. 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected]. 
> > > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/3620a92d-f2d2-43a4-9f92-4d12c3f0c45f%40googlegroups.com.
>  
>
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/d30de2a4-a70b-41df-a9d3-f65001498be7%40googlegroups.com.
>  
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b053934a-508a-414b-a826-b0a2f1e1e078%40googlegroups.com.

Reply via email to