[chef] how to assign public definitions for custom and community cookbooks


Chronological Thread 
  • From: Vladimir Skubriev < >
  • To:
  • Subject: [chef] how to assign public definitions for custom and community cookbooks
  • Date: Wed, 15 May 2013 13:10:23 +0400

How to assign public definitions for custom and community cookbooks?

We want to use custom cookbooks and community cookbooks.

In community cookbooks there are default attributes.

For example cookbook openldap have an attribute:

default['openldap']['server'] = "ldap.localdomain"


This attribute must have our specific a domainname when chef-client runs

For example we have a custom cookbook network-basic. And this cookbook have attrribute:

default['dns']['domainname'] = "example.com"

I want to define attribute once.

Where i must define domainname:

1. in the databag for example:

    databag globalsettings item dns

knife data bag show globalsettings dns
dchostname:   pdc
dcipaddress:  192.168.0.3
domainname:   example.com
id:           dns
  
how can i override attribute from community cookbook ?
how can i define and/or override attribute dnsdomainname in a custom cookbook?

2. in the environment production for example ?

3. in the role attributes ?


-- 
Best regards,

CVision Lab System Administrator
Vladmir Skubriev



Archive powered by MHonArc 2.6.16.

§