-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapt.sls
62 lines (53 loc) · 1.54 KB
/
apt.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# apply debian lts apt sources and/or backports
#
{% if grains['os'] == 'Debian' %}
{% if grains['oscodename'] == 'wheezy' %}
backports:
pkgrepo.managed:
- humanname: Debian Wheezy Backports
- name: deb http://http.debian.net/debian wheezy-backports main
- file: /etc/apt/sources.list.d/wheezy-backports.list
apt-transport-https:
pkg.installed
{% endif %}
{% if grains['oscodename'] == 'jessie' %}
backports:
pkgrepo.managed:
- humanname: Debian Jessie Backports
- name: deb http://httpredir.debian.org/debian jessie-backports main
- file: /etc/apt/sources.list.d/backports.list
apt-transport-https:
pkg.installed
{% endif %}
{% if grains['oscodename'] == 'stretch' %}
backports:
pkgrepo.managed:
- humanname: Debian Stretch Backports
- name: deb http://httpredir.debian.org/debian stretch-backports main
- file: /etc/apt/sources.list.d/backports.list
apt-transport-https:
pkg.installed
{% endif %}
{% if grains['oscodename'] == 'buster' %}
{% if grains['pythonversion'][0] == 3 %}
python3-apt:
pkg.installed
{% else %}
python-apt:
pkg.installed
{% endif %}
backports:
pkgrepo.managed:
- humanname: Debian Buster Backports
- name: deb http://httpredir.debian.org/debian buster-backports main
- file: /etc/apt/sources.list.d/backports.list
- require:
{% if grains['pythonversion'][0] == 3 %}
- pkg: python3-apt
{% else %}
- pkg: python-apt
{% endif %}
# apt-transport-https is now part of apt itself, no need to install separately
{% endif %}
{% endif %}