# puppetlabs/apt - sources.list.d entry manifest format?

I'm using the apt module, & I'd like to clear out sources.list & have the same structure as individual sources.list.d .list files. I've tried several variations on the formatting of the files without success.

I initially just tried copying the sources.list entries into individual files, but apt-get update complained about being unable to retrieve headers due to inability to find a certain entry.

I've made some progress. Here is my manifest to set the mirror:

class myorg::sourceslist (
$mirror = undef,$mirrorkey = undef,
$mirrorkey_server = undef, ) { include apt apt::source { 'ubuntu_stable': location => "http://$mirror:80/ubuntu/",
release           => "$lsbdistcodename", repos => 'main restricted multiverse universe', key => "$mirrorkey",
key_server        => "$mirrorkey_server", include_src => false, include_deb => true } }  The problem so far is that apt-get update doesn't include the security or updates aspects of the mirror. I tried adding updates & security to the end of the repos line, but that didn't work. edit retag close merge delete ## 1 Answer Sort by » oldest newest most voted We solved this on IRC. Basically what was needed was creating separate entries to handle the different URL's and release names of the repository. apt::source { 'ubuntu': location =>$mirror,
release => $lsbdistcodename, repos => 'main restricted universe multiverse', } apt::source { 'ubuntu_updates': location =>$mirror,
release => "${lsbdistcodename}-updates", repos => 'main restricted universe multiverse', } apt::source { 'ubuntu_security': location =>$mirror,
release => "\${lsbdistcodename}-security",
repos => 'main restricted universe multiverse',
}

more