Repetitive Tasks

Hi,

I have a scenario where I am trying to create cluster of servers a.k.a nodes on a box provisioned by Chef, so the structure of the servers nodes are typically same, there will be slight modification to the server configuration files that are deployed.

I just did server_nodes.each do |x,y| { all my chef tasks }, i see some discrepancies when running my chef tasks, e.g. one of my chef task will create a template for one sever node it creates correctly for other it complains the directory does not exist as when i checked the node it did not have the directory … all is well when i run as single node. Does chef has any best practice or the way to do for these kind of scenarios ?

Regards,
Kamesh

Hi kamesh,

Are you getting these erro while executing the chef dry run [chef-client –W]
Try executing chef-actual run, in that case it should create the missing directories.

Let me know if that helps.

Cheers!!
Doel
From: Kamesh Sampath [mailto:kamesh.sampath@hotmail.com]
Sent: Thursday, October 30, 2014 12:59 PM
To: chef@lists.opscode.com
Cc: charles@getchef.com
Subject: [chef] Repetitive Tasks

Hi,

I have a scenario where I am trying to create cluster of servers a.k.a nodes on a box provisioned by Chef, so the structure of the servers nodes are typically same, there will be slight modification to the server configuration files that are deployed.

I just did server_nodes.each do |x,y| { all my chef tasks }, i see some discrepancies when running my chef tasks, e.g. one of my chef task will create a template for one sever node it creates correctly for other it complains the directory does not exist as when i checked the node it did not have the directory … all is well when i run as single node. Does chef has any best practice or the way to do for these kind of scenarios ?

Regards,
Kamesh


This email message and any attachments are intended solely for the use of the addressee. If you are not the intended recipient, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this transmission. If you have received this message in error, please promptly notify the sender by reply email and immediately delete this message from your system. This message and any attachments may contain information that is confidential, privileged or exempt from disclosure. Delivery of this message to any person other than the intended recipient is not intended to waive any right or privilege. Message transmission is not guaranteed to be secure or free of software viruses.