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 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise maindeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise maindeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates maindeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates maindeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise universedeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise universedeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universedeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universedeb http://security.ubuntu.com/ubuntu precise-security maindeb-src http://security.ubuntu.com/ubuntu precise-security maindeb http://security.ubuntu.com/ubuntu precise-security universedeb-src http://security.ubuntu.com/ubuntu precise-security universeAnd the target setup:In /etc/apt/sources.list:deb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise maindeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise maindeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates maindeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates maindeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise universedeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise universedeb http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universedeb-src http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates universeand in /etc/apt/sources.list.d/precise-security.list:deb http://security.ubuntu.com/ubuntu precise-security maindeb-src http://security.ubuntu.com/ubuntu precise-security maindeb http://security.ubuntu.com/ubuntu precise-security universedeb-src http://security.ubuntu.com/ubuntu precise-security universeI 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.