Ask Your Question
0

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

asked 2014-09-12 15:11:23 -0500

t-readyroc gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-16 07:14:30 -0500

Daenney gravatar image

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',
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-12 15:11:23 -0500

Seen: 396 times

Last updated: Sep 16 '14