[chef] Exposing attributes from cookbooks you depend on


Chronological Thread 
  • From: "Hajducko, Steven" < >
  • To: "< >" < >
  • Subject: [chef] Exposing attributes from cookbooks you depend on
  • Date: Thu, 19 Mar 2015 19:51:59 +0000
  • Accept-language: en-US
  • Authentication-results: lists.opscode.com; dkim=none (message not signed) header.d=none;
  • Domainkey-signature: s=default; d=intuit.com; c=nofws; q=dns; h=X-SBRS:X-IronPort-AV:Received:Received:Received:Received: From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:x-originating-ip: authentication-results:x-microsoft-antispam: x-microsoft-antispam-prvs:x-forefront-antispam-report: x-exchange-antispam-report-test: x-exchange-antispam-report-cfa-test:x-forefront-prvs: Content-Type:Content-ID:Content-Transfer-Encoding: MIME-Version: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id: X-MS-Exchange-Transport-CrossTenantHeadersStamped: Return-Path:X-OriginatorOrg; b=WWCTuuB2slS0SF+wedBrCspe1JeOLl+4LlfhLH3U5G1aRc+PgPaUyzKn qPR4XlmLYQLFJ3q2IUXNZV+ga6hrJqYWA/phTQP5Rla1fegLXcxMJq2bb 8eS7GGafBXE/TgYmw33FkWA4OykKF14Zc2fS94wRGc4Dj+5V0HFVgComk M=;

How are people typically exposing the attributes that a cookbook you are 
depending on may have?

For example, I have a cobbler cookbook.  It has some attributes that are 
required for configuring cobbler - things like DHCP, etc.

Then I have my provserv cookbook that wraps it and does a few other things, 
specific to our org ( installing some content into cobbler and such ).

The provserv cookbook is what's included in the nodes runlist.  But - you 
need to make sure those cobbler attributes get set, otherwise cobbler isn't 
going to work right.

Do you create the same attributes in the provserv cookbook and then overwrite 
the cobbler ones?  ( ie: since I have a default['cobbler']['dhcp_start'] 
attribute, do I make a default['provserv']['dhcp_start'] attribute that sets 
the cobbler one? ).  Do you depend on the user to figure out that provserv is 
depending on cobbler and they need to read the cobbler cookbook to see what 
other attributes need to be configured?

Just curious how others are accomplishing this.  Examples would be most 
appreciated.

Thanks

Steve


Archive powered by MHonArc 2.6.16.

§