Skip to content
Snippets Groups Projects
Commit c9155826 authored by ale's avatar ale
Browse files

Remove special handling of pre-Bullseye Debian distros

parent 640aa019
No related branches found
No related tags found
1 merge request!255Drop support for old Debian distros
Pipeline #27608 passed
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
# Install Podman using packages from the Debian distribution # Install Podman using packages from the Debian distribution
# (available starting with Bullseye). # (available starting with Bullseye).
- fail:
msg: "Debian packages for Podman are only present in Bullseye"
when: "float_debian_dist in ('stretch', 'buster')"
- name: Remove podman Kubic repository key - name: Remove podman Kubic repository key
file: file:
path: "/etc/apt/trusted.gpg.d/kubic.gpg" path: "/etc/apt/trusted.gpg.d/kubic.gpg"
......
...@@ -114,12 +114,7 @@ done ...@@ -114,12 +114,7 @@ done
# option to get rid of the useless 'podman' process. # option to get rid of the useless 'podman' process.
{% if container_runtime == 'podman' %} {% if container_runtime == 'podman' %}
exec /usr/bin/podman run \ exec /usr/bin/podman run \
{% if float_debian_dist in ('stretch', 'buster') %}
--cgroup-manager=cgroupfs \
--cgroup-parent /system.slice/docker-{{ item.tag }}.service \
{% else %}
--cgroups=disabled \ --cgroups=disabled \
{% endif %}
--replace \ --replace \
--sdnotify=conmon \ --sdnotify=conmon \
{% elif container_runtime == 'docker' %} {% elif container_runtime == 'docker' %}
......
...@@ -21,12 +21,8 @@ SyslogIdentifier={{ item.service }}-{{ item.container.name }} ...@@ -21,12 +21,8 @@ SyslogIdentifier={{ item.service }}-{{ item.container.name }}
{% if item.container.resources is defined %} {% if item.container.resources is defined %}
{% if item.container.resources.ram is defined %} {% if item.container.resources.ram is defined %}
MemoryMax={{ item.container.resources.ram }} MemoryMax={{ item.container.resources.ram }}
{% if float_debian_dist == 'buster' %}
ExecStartPost=+/bin/sh -c "echo 0 > /sys/fs/cgroup/memory/system.slice/%n/memory.swappiness"
{% else %}
MemorySwapMax=0 MemorySwapMax=0
{% endif %} {% endif %}
{% endif %}
{% if item.container.resources.cpu is defined %} {% if item.container.resources.cpu is defined %}
CPUQuota={{ 100 * item.container.resources.cpu }}% CPUQuota={{ 100 * item.container.resources.cpu }}%
{% endif %} {% endif %}
......
...@@ -83,13 +83,11 @@ ...@@ -83,13 +83,11 @@
state: present state: present
when: "testing|default(True)" when: "testing|default(True)"
# mtail 3.0.0~rc19-2 on Buster is broken when reading from named pipes # Remove legacy stretch/buster mtail package pin.
# Pin mtail to ai3 repo that ships mtail 3.0.0~rc5-1~bpo9+1 - name: Cleanup mtail package pin
- name: Force mtail version on buster file:
copy: path: "/etc/apt/preferences.d/99float-syslog"
src: "mtail.apt-preferences" state: absent
dest: "/etc/apt/preferences.d/99float-syslog"
when: float_debian_dist == 'buster'
- name: Install base packages - name: Install base packages
apt: apt:
...@@ -124,6 +122,7 @@ ...@@ -124,6 +122,7 @@
- auditd - auditd
- audisp-json - audisp-json
- prometheus-node-exporter - prometheus-node-exporter
- prometheus-node-exporter-collectors
- assetmon - assetmon
- name: Install extra packages - name: Install extra packages
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
- name: Audispd plugins configured - name: Audispd plugins configured
copy: copy:
src: "audit/plugins.d/{{ item }}" src: "audit/plugins.d/{{ item }}"
dest: "/etc/{{ 'audisp' if float_debian_dist in ('stretch', 'buster') else 'audit' }}/plugins.d/{{ item }}" dest: "/etc/audit/plugins.d/{{ item }}"
with_items: with_items:
- syslog.conf - syslog.conf
- json.conf - json.conf
......
...@@ -7,13 +7,6 @@ ...@@ -7,13 +7,6 @@
notify: notify:
- reload prometheus-node-exporter - reload prometheus-node-exporter
- name: Install prometheus node extra package
apt:
name:
- prometheus-node-exporter-collectors
state: present
when: "float_debian_dist not in ('stretch', 'buster')"
- name: Add static metrics - name: Add static metrics
template: template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
......
{% if apt_sources_list_override is defined %}{{ apt_sources_list_override }}{% else %} {% if apt_sources_list_override is defined %}{{ apt_sources_list_override }}{% else %}
deb http://deb.debian.org/debian {{ float_debian_dist }} main contrib non-free deb http://deb.debian.org/debian {{ float_debian_dist }} main contrib non-free
deb http://deb.debian.org/debian {{ float_debian_dist }}-updates main contrib non-free deb http://deb.debian.org/debian {{ float_debian_dist }}-updates main contrib non-free
{% if float_debian_dist in ('stretch', 'buster') %}
deb http://deb.debian.org/debian {{ float_debian_dist }}-backports main
deb http://security.debian.org/ {{ float_debian_dist }}/updates main contrib non-free
{% else %}
deb http://security.debian.org/debian-security {{ float_debian_dist }}-security main contrib non-free deb http://security.debian.org/debian-security {{ float_debian_dist }}-security main contrib non-free
{% endif %} {% endif %}
{% endif %}
...@@ -8,10 +8,6 @@ view "internal-in" in { ...@@ -8,10 +8,6 @@ view "internal-in" in {
{% endfor %} {% endfor %}
}; };
recursion yes; recursion yes;
{% if float_debian_dist == 'buster' %}
additional-from-auth yes;
additional-from-cache yes;
{% endif %}
zone-statistics no; zone-statistics no;
// Send minimal responses, to avoid problems with the Spamassassin // Send minimal responses, to avoid problems with the Spamassassin
...@@ -33,13 +29,6 @@ view "external-in" in { ...@@ -33,13 +29,6 @@ view "external-in" in {
recursion no; recursion no;
zone-statistics yes; zone-statistics yes;
{% if float_debian_dist == 'buster' %}
// Do not trust the cache when generating additional records
// for our authoritative zones.
additional-from-auth no;
additional-from-cache no;
{% endif %}
// Include manually-maintained zones. // Include manually-maintained zones.
include "/etc/bind/named.conf.external-custom-zones"; include "/etc/bind/named.conf.external-custom-zones";
......
...@@ -28,9 +28,6 @@ options { ...@@ -28,9 +28,6 @@ options {
listen-on-v6 { any; }; listen-on-v6 { any; };
{% endif %} {% endif %}
{% if float_debian_dist == 'buster' %}
dnssec-enable yes;
{% endif %}
dnssec-validation auto; dnssec-validation auto;
notify no; notify no;
......
...@@ -4,11 +4,9 @@ global ...@@ -4,11 +4,9 @@ global
group haproxy group haproxy
chroot /var/lib/haproxy chroot /var/lib/haproxy
daemon daemon
{% if float_debian_dist != 'buster' %}
# use journald-compatibile short format, and don't send 'emerg' level out # use journald-compatibile short format, and don't send 'emerg' level out
# http://cbonte.github.io/haproxy-dconv/2.2/configuration.html#3.1-log # http://cbonte.github.io/haproxy-dconv/2.2/configuration.html#3.1-log
log stdout format short local4 info alert log stdout format short local4 info alert
{% endif %}
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
defaults defaults
......
...@@ -15,10 +15,8 @@ upstream {{ upstream.name }}{% if shard %}_{{ shard }}{% endif %} { ...@@ -15,10 +15,8 @@ upstream {{ upstream.name }}{% if shard %}_{{ shard }}{% endif %} {
{% endif %} {% endif %}
keepalive 8; keepalive 8;
{% if float_debian_dist != 'buster' %}
keepalive_timeout 300s; keepalive_timeout 300s;
keepalive_requests 1000; keepalive_requests 1000;
{% endif %}
} }
{% endmacro %} {% endmacro %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment