That worked thanks!

On Tuesday, June 4, 2013 2:09:48 PM UTC-6, Keith Burdis wrote:
>
> You could set a custom "role" fact on node1 and node2 with the value 
> "webserver" and then use the "role" fact in your Hiera hierarchy.
>
> For example using facter.d on on node1 and node2:
>
> # cd /etc/facter/facts.d
> # echo 'role: webserver' >> custom_facts.yaml
> # facter -p role
> role => webserver
>
>  and on the master:
>
> # cat /etc/hiera.yaml 
> ...
> :hierarchy:
>   - %{role}
> ...
>
> with the common configuration in webserver.yaml under your Hiera datadir.
>
>   - Keith
>
>
>
> On 4 June 2013 20:41, <[email protected] <javascript:>> wrote:
>
>> Hi, 
>>
>> I am trying to use Hiera in puppet 3 and I have two nodes that both need 
>> the same configuration. In this case they are two web servers which have 
>> the same apache configuration.
>>
>> Rather than creating two seperate hiera files for node1.yaml and 
>> node2.yaml is there a way to group these by role (e.g. webserver.yaml)? I 
>> want to avoid duplicating the configuration if possible and keep the data 
>> in hiera.
>>
>> Thanks!
>> Joe
>>
>> -- 
>> 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 post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to