Yes, i can get the whole string but if i need the parameters inside that 
string as sn, project,dbname etc...

example:

   file{"/var/sites/$sn":
                        ensure=>directory,
                        mode=>0755,
                        owner=>$user,
                        group=>$user,
                        require=>File["/var/sites"],
                }

Il giorno martedì 14 gennaio 2014 04:11:33 UTC+1, CD ha scritto:
>
> Hi Alessandro,
>
> I think if you specify $users it has all the content of children but in a 
> single string. Don't know whether this is what you need.
>
> try:
> $users=hiera('users')
> notify { $users: }
>
> Regards,
> CD
>
> On Tuesday, January 14, 2014 11:02:29 AM UTC+10, alessandro mazzoli wrote:
>>
>> Hi all,
>> I'm trying to automate the set up of the machines staging,passing by an 
>> php application ServerName , ProjectType,DbCredentials etc..(all strings) 
>> and convert to yaml
>> Here's my common.yaml:
>>
>> ---
>> users:
>>   -sn: server.example.com
>>   -project : Symfony
>>   -dbname : test
>>   -dbuser  : test
>>   -dbpwd : test
>>   -sn: server2.example.com
>>   -project : Idephix
>>   -dbname : test
>>   -dbuser  : test
>>   -dbpwd : test
>>
>> Here's my hiera.yaml
>> ---
>> :backends:
>>    -yaml
>> :yaml:
>>   :datadir: '/etc/puppet/hieradata'
>> :hierarchy:
>>   -common
>>
>>
>> Is there any possibility on manifest to get all those variables by not 
>> specifing the index as below ??
>> $users=hiera('users')
>> $sn0=$users[*0*]['sn']
>> $sn1=
>> ......
>> ...
>>
>> I would like to preserve all the configurations if possible inside 
>> common.yaml
>>
>> Thanks for the help
>>
>>
>>
>>

-- 
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/25cf147a-9eee-4e84-a0fe-aca034c44002%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to