[chef] RE: Newlines in templates


Chronological Thread 
  • From: Adam Edwards < >
  • To:
  • Subject: [chef] RE: Newlines in templates
  • Date: Tue, 5 Nov 2013 10:54:36 -0800

Joshua, which file has the DOS newlines – are you saying a template file in the simple_iptables cookbook has it? Or is the issue that your editor is doing DOS style newlines?

 

If it’s the latter, I think the simplest thing is to just configure the editor to do Unix line-endings. I get that that can still be challenging if there are multiple people working on these things and you need to enforce Unix-line endings for everyone.

 

-Adam

 

From: THARP, JOSHUA L [mailto: "> ]
Sent: Tuesday, November 5, 2013 10:28 AM
To: ">
Subject: [chef] Newlines in templates

 

I’m reusing the simple_iptables cookbook and working on a Windows PC for my workstation. My rules file is failing when I converge the node, and it tries to restart iptables. The problem seems to be the newlines in the file are DOS. For my own cookbooks I can set the newlines to always be UNIX, but I don’t want to edit a community cookbook. Is there a Chef/knife trick for ensuring that the template newlines are platform appropriate?




Archive powered by MHonArc 2.6.16.

§