[chef] Re: APT repositories - non standard management in Chef.


Chronological Thread 
  • From: Brian Hatfield < >
  • To: " " < >
  • Subject: [chef] Re: APT repositories - non standard management in Chef.
  • Date: Mon, 20 Apr 2015 10:59:59 -0400

We use the apt cookbook. One key feature that it is especially helpful beyond using the file resource is in key management. It also supports a few different configuration modes. I recommend you use it over attempting to manage the repo lists yourself; the next person looking at your chef repo will appreciate it.

On Mon, Apr 20, 2015 at 10:56 AM, Rafał Radecki < " target="_blank"> > wrote:
Hi All :)

I am using some Ubuntu hosts. Overall I need to manage /etc/apt/sources.list file and contents of /etc/apt/sources.list.d directory with chef. 

At the moment my example /etc/apt/sources.list is:

deb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universe
deb http://security.ubuntu.com/ubuntu precise-security main
deb-src http://security.ubuntu.com/ubuntu precise-security main
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe

And the target setup:

In /etc/apt/sources.list:


and in /etc/apt/sources.list.d/precise-security.list:

deb http://security.ubuntu.com/ubuntu precise-security main
deb-src http://security.ubuntu.com/ubuntu precise-security main
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe

I know that I can achieve this by using file resource. I can also potentially use apt (https://supermarket.chef.io/cookbooks/apt) cookbook. 

What is the best solution in your opinion? Any hidden caveats?

BR,
Rafal.




Archive powered by MHonArc 2.6.16.

§