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


Chronological Thread 
  • From: Rafał Radecki < >
  • To:
  • Subject: [chef] APT repositories - non standard management in Chef.
  • Date: Mon, 20 Apr 2015 16:56:19 +0200

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.

§