summaryrefslogtreecommitdiffstats
path: root/roles/common/templates/etc/apt
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2017-07-29 13:47:43 +0200
committerGuilhem Moulin <guilhem@fripost.org>2017-07-29 13:47:43 +0200
commita48661c2f5082b8e15a952aaf33b1e8848ffbe90 (patch)
tree5b59f8f3c478f30e7926609a6b3786f3f22a00b5 /roles/common/templates/etc/apt
parent874ee116c6f1ee61bca9cba4fa8347a26a0fa1e9 (diff)
Fix detection of KVM guests.
Diffstat (limited to 'roles/common/templates/etc/apt')
-rw-r--r--roles/common/templates/etc/apt/preferences.j23
-rw-r--r--roles/common/templates/etc/apt/sources.list.j24
2 files changed, 3 insertions, 4 deletions
diff --git a/roles/common/templates/etc/apt/preferences.j2 b/roles/common/templates/etc/apt/preferences.j2
index 5d4b415..ecbb4ec 100644
--- a/roles/common/templates/etc/apt/preferences.j2
+++ b/roles/common/templates/etc/apt/preferences.j2
@@ -20,8 +20,7 @@ Pin: version *
Pin-Priority: 200
{% endif %}
-{% if ansible_processor[0] | search('^(Genuine)?Intel.*') and
- not (ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'xen') -%}
+{% if ansible_processor[0] | search('^(Genuine)?Intel.*') and not ansible_virtualization_role == 'guest' -%}
# Automatically upgrade the microcode (when manually installed)
Package: intel-microcode iucode-tool
Pin: version *
diff --git a/roles/common/templates/etc/apt/sources.list.j2 b/roles/common/templates/etc/apt/sources.list.j2
index 2dbaee4..1f51621 100644
--- a/roles/common/templates/etc/apt/sources.list.j2
+++ b/roles/common/templates/etc/apt/sources.list.j2
@@ -2,9 +2,9 @@
# Do NOT edit this file directly!
# vim: set filetype=debsources :
-deb http://ftp.{%if geoip is defined %}{{ geoip }}.{% endif %}debian.org/debian/ {{ ansible_lsb.codename }} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[0] | search("^(Genuine)?Intel.*") and not (ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'xen')) %} contrib non-free{% endif %}
+deb http://ftp.{%if geoip is defined %}{{ geoip }}.{% endif %}debian.org/debian/ {{ ansible_lsb.codename }} main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[0] | search("^(Genuine)?Intel.*") and ansible_virtualization_role == 'guest') %} contrib non-free{% endif %}
-deb http://security.debian.org/ {{ ansible_lsb.codename }}/updates main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[0] | search("^(Genuine)?Intel.*") and not (ansible_virtualization_role == 'guest' and ansible_virtualization_type == 'xen')) %} contrib non-free{% endif %}
+deb http://security.debian.org/ {{ ansible_lsb.codename }}/updates main{% if inventory_hostname_short in non_free_packages.keys() or (ansible_processor[0] | search("^(Genuine)?Intel.*") and not ansible_virtualization_role == 'guest') %} contrib non-free{% endif %}
deb http://ftp.{%if geoip is defined %}{{ geoip }}.{% endif %}debian.org/debian/ {{ ansible_lsb.codename }}-updates main