[chef] What is the best way to change a field of a conf file in centos


Chronological Thread 
  • From: Sam Su < >
  • To: " " < >
  • Subject: [chef] What is the best way to change a field of a conf file in centos
  • Date: Tue, 25 Mar 2014 17:23:19 -0700

Hi,

I am trying to change a field (here is "net.ipv4.ip_nonlocal_bind=1") of the file /etc/sysctl.conf, currently I am using template to change the field, however someone complained that it was not good to template the system file ''sysctl.conf', because it may also used by other cookbooks. I agreed with that guy, it is definitely better to only change a specific field instead of the whole file with respect to a system file.

I am wondering what is the best way to change a specific field of a config file in Chef.
It will be much appreciated if someone can give me some hints and share some opinions.

Thanks,
Sam



Archive powered by MHonArc 2.6.16.

§