Well you will have to devise a defined type that takes the variable name
as the resource title, and the value as an argument. Data structure has
to be
my_variables:
my_project1:
var1:
value: value1
var2:
value: value2
Then the my_project1 hash is eligible for use with create_resources.
With Puppet 4 you can use iteration over the hash instead, so that no
data restructuring is necessary. If you are on a recent version of
Puppet 3, you can do the same thing using the parser=future setting.
HTH,
Felix
On 05/04/2015 02:56 PM, [email protected] wrote:
> Hi
>
> I want to manage an INI file with an undefined number of key/value records.
> I wish to add each var/value recording in a single file (manage by
> augeas) for each project, but I don't know how to make calls or pass the
> data to create_resources.
> Don't want to have a hash for each var/value, too boring to manage.
>
> So here's the Hiera file I write :
> ---
> my_variables:
> my_project1:
> var1:value1
> var2:value2
> my_project2:
> var1:value1
> var2:value2
>
>
> Any idea ?
>
> Thanks.
--
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/55534BAD.8000802%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.