diff --git a/ubuntu/files/sources.list b/ubuntu/files/sources.list new file mode 100644 index 00000000..a896d2f6 --- /dev/null +++ b/ubuntu/files/sources.list @@ -0,0 +1,56 @@ +# Note that this sources.list file is copied from a Ubuntu VM +# and is managed by Salt. +# + +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. +deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} main restricted +deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates main restricted +deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} universe +deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} universe +deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates universe +deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +#deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} multiverse +#deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }} multiverse +#deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates multiverse +#deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-updates multiverse + +## Uncomment the following two lines to add software from the 'backports' +## repository. +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +#deb http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-backports main restricted universe multiverse +#deb-src http://archive.ubuntu.com/ubuntu {{ grains['oscodename'] }}-backports main restricted universe multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. +## This software is not part of Ubuntu, but is offered by Canonical and the +## respective vendors as a service to Ubuntu users. +# deb http://archive.canonical.com/ubuntu {{ grains['oscodename'] }} partner +# deb-src http://archive.canonical.com/ubuntu {{ grains['oscodename'] }} partner + +deb http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security main {% if grains['oscodename'] == 'xenial' %} restricted {% endif %} +deb-src http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security main {% if grains['oscodename'] == 'xenial' %} restricted {% endif %} + +deb http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security universe +deb-src http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security universe +#deb http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security multiverse +#deb-src http://security.ubuntu.com/ubuntu {{ grains['oscodename'] }}-security multiverse diff --git a/ubuntu/init.sls b/ubuntu/init.sls index 54ae17b6..097eb82d 100644 --- a/ubuntu/init.sls +++ b/ubuntu/init.sls @@ -23,3 +23,17 @@ - group - mode - clean: True + +/etc/apt/sources.list: + file.managed: + - user: root + - group: root + - mode: 644 + - template: jinja + - source: salt://{{ tpldir }}/files/sources.list + +refresh_pkg_db: + module.run: + - name: pkg.refresh_db + - onchanges: + - file: /etc/apt/sources.list