Merge branch 'unstable' into stable
commit
a10cff94d0
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: restart amavis
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: amavis
|
||||
state: restarted
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Remove admin user
|
||||
user:
|
||||
ansible.builtin.user:
|
||||
name: admin
|
||||
state: absent
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
- name: restart apache
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: apache2
|
||||
state: restarted
|
||||
|
||||
- name: reload apache
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: apache2
|
||||
state: reloaded
|
||||
|
||||
- name: restart munin-node
|
||||
service:
|
||||
ansible.builtin.service:
|
||||
name: munin-node
|
||||
state: restarted
|
||||
|
@ -0,0 +1,3 @@
|
||||
Package: *
|
||||
Pin: release a=bookworm-backports
|
||||
Pin-Priority: 50
|
Binary file not shown.
@ -0,0 +1,28 @@
|
||||
---
|
||||
|
||||
- name: Backports deb822 sources list is installed
|
||||
ansible.builtin.template:
|
||||
src: '{{ ansible_distribution_release }}_backports.sources.j2'
|
||||
dest: /etc/apt/sources.list.d/backports.sources
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_sources
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Backports configuration
|
||||
ansible.builtin.copy:
|
||||
src: '{{ ansible_distribution_release }}_backports_preferences'
|
||||
dest: /etc/apt/preferences.d/0-backports-defaults
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_config
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
when: apt_backports_sources is changed or apt_backports_config is changed
|
||||
tags:
|
||||
- apt
|
@ -0,0 +1,45 @@
|
||||
---
|
||||
- name: No backports config in default sources.list
|
||||
ansible.builtin.lineinfile:
|
||||
dest: /etc/apt/sources.list
|
||||
regexp: "backports"
|
||||
state: absent
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Backports sources list is installed
|
||||
ansible.builtin.template:
|
||||
src: '{{ ansible_distribution_release }}_backports.list.j2'
|
||||
dest: /etc/apt/sources.list.d/backports.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_list
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Backports configuration
|
||||
ansible.builtin.copy:
|
||||
src: '{{ ansible_distribution_release }}_backports_preferences'
|
||||
dest: /etc/apt/preferences.d/0-backports-defaults
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_config
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Archived backport are accepted (jessie)
|
||||
ansible.builtin.lineinfile:
|
||||
dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
|
||||
line: 'Acquire::Check-Valid-Until no;'
|
||||
create: yes
|
||||
state: present
|
||||
tags:
|
||||
- apt
|
||||
when: ansible_distribution_release == "jessie"
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
tags:
|
||||
- apt
|
||||
when: apt_backports_list is changed or apt_backports_config is changed
|
@ -1,45 +1,13 @@
|
||||
---
|
||||
- name: No backports config in default sources.list
|
||||
lineinfile:
|
||||
dest: /etc/apt/sources.list
|
||||
regexp: "backports"
|
||||
state: absent
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Backports sources list is installed
|
||||
template:
|
||||
src: '{{ ansible_distribution_release }}_backports.list.j2'
|
||||
dest: /etc/apt/sources.list.d/backports.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_list
|
||||
tags:
|
||||
- apt
|
||||
# Backward compatibility task file
|
||||
|
||||
- name: Backports configuration
|
||||
copy:
|
||||
src: '{{ ansible_distribution_release }}_backports_preferences'
|
||||
dest: /etc/apt/preferences.d/0-backports-defaults
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_backports_config
|
||||
tags:
|
||||
- apt
|
||||
- name: Install backports repositories (Debian <12)
|
||||
ansible.builtin.import_tasks: backports.oneline.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Archived backport are accepted (jessie)
|
||||
lineinfile:
|
||||
dest: '/etc/apt/apt.conf.d/99no-check-valid-until'
|
||||
line: 'Acquire::Check-Valid-Until no;'
|
||||
create: yes
|
||||
state: present
|
||||
when: ansible_distribution_release == "jessie"
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_backports_list is changed or apt_backports_config is changed
|
||||
tags:
|
||||
- apt
|
||||
- name: Install backports repositories (Debian >=12)
|
||||
ansible.builtin.import_tasks: backports.deb822.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
@ -0,0 +1,45 @@
|
||||
---
|
||||
|
||||
- name: Change basics repositories
|
||||
ansible.builtin.template:
|
||||
src: "{{ ansible_distribution_release }}_basics.sources.j2"
|
||||
dest: /etc/apt/sources.list.d/system.sources
|
||||
mode: "0644"
|
||||
force: yes
|
||||
register: apt_basic_sources
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Change security repositories
|
||||
ansible.builtin.template:
|
||||
src: "{{ ansible_distribution_release }}_security.sources.j2"
|
||||
dest: /etc/apt/sources.list.d/security.sources
|
||||
mode: "0644"
|
||||
force: yes
|
||||
register: apt_security_sources
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Find one-line APT sources
|
||||
ansible.builtin.find:
|
||||
paths: /etc/apt
|
||||
patterns: '*.list'
|
||||
register: list_files
|
||||
|
||||
- name: Disable one-line-formatted sources
|
||||
ansible.builtin.command:
|
||||
cmd: "mv --verbose {{ item.path }} {{ item.path }}.bak"
|
||||
environment:
|
||||
LC_ALL: C
|
||||
loop: "{{ list_files.files }}"
|
||||
register: rename_cmd
|
||||
changed_when: "'renamed' in rename_cmd.stdout"
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
tags:
|
||||
- apt
|
||||
when: apt_basic_list is changed or apt_security_sources is changed
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
|
||||
- name: Change basics repositories
|
||||
ansible.builtin.template:
|
||||
src: "{{ ansible_distribution_release }}_basics.list.j2"
|
||||
dest: /etc/apt/sources.list
|
||||
mode: "0644"
|
||||
force: yes
|
||||
register: apt_basic_list
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
tags:
|
||||
- apt
|
||||
when: apt_basic_list is changed
|
@ -1,33 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Change basics repositories
|
||||
template:
|
||||
src: "{{ ansible_distribution_release }}_basics.list.j2"
|
||||
dest: /etc/apt/sources.list
|
||||
mode: "0644"
|
||||
force: yes
|
||||
register: apt_basic_list
|
||||
tags:
|
||||
- apt
|
||||
# Backward compatibility task file
|
||||
|
||||
- name: Clean GANDI sources.list.d/debian-security.list
|
||||
file:
|
||||
path: '{{ item }}'
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/apt/sources.list.d/debian-security.list
|
||||
- /etc/apt/sources.list.d/debian-jessie.list
|
||||
- /etc/apt/sources.list.d/debian-stretch.list
|
||||
- /etc/apt/sources.list.d/debian-buster.list
|
||||
- /etc/apt/sources.list.d/debian-bullseye.list
|
||||
- /etc/apt/sources.list.d/debian-update.list
|
||||
when: apt_clean_gandi_sourceslist | bool
|
||||
tags:
|
||||
- apt
|
||||
- name: Install basics repositories (Debian <12)
|
||||
ansible.builtin.import_tasks: basics.oneline.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_basic_list is changed
|
||||
tags:
|
||||
- apt
|
||||
- name: Install basics repositories (Debian >=12)
|
||||
ansible.builtin.import_tasks: basics.deb822.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
@ -0,0 +1,45 @@
|
||||
---
|
||||
|
||||
- name: Look for legacy apt keyring
|
||||
ansible.builtin.stat:
|
||||
path: /etc/apt/trusted.gpg
|
||||
register: _trusted_gpg_keyring
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Evolix embedded GPG key is absent
|
||||
ansible.builtin.apt_key:
|
||||
id: "B8612B5D"
|
||||
keyring: /etc/apt/trusted.gpg
|
||||
state: absent
|
||||
tags:
|
||||
- apt
|
||||
when: _trusted_gpg_keyring.stat.exists
|
||||
|
||||
- name: Add Evolix GPG key
|
||||
ansible.builtin.copy:
|
||||
src: pub_evolix.asc
|
||||
dest: "{{ apt_keyring_dir }}/pub_evolix.asc"
|
||||
force: yes
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Evolix public list is installed
|
||||
ansible.builtin.template:
|
||||
src: evolix_public.sources.j2
|
||||
dest: /etc/apt/sources.list.d/evolix_public.sources
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_evolix_public
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
tags:
|
||||
- apt
|
||||
when: apt_evolix_public is changed
|
@ -0,0 +1,45 @@
|
||||
---
|
||||
|
||||
- name: Look for legacy apt keyring
|
||||
ansible.builtin.stat:
|
||||
path: /etc/apt/trusted.gpg
|
||||
register: _trusted_gpg_keyring
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Evolix embedded GPG key is absent
|
||||
ansible.builtin.apt_key:
|
||||
id: "B8612B5D"
|
||||
keyring: /etc/apt/trusted.gpg
|
||||
state: absent
|
||||
tags:
|
||||
- apt
|
||||
when: _trusted_gpg_keyring.stat.exists
|
||||
|
||||
- name: Add Evolix GPG key
|
||||
ansible.builtin.copy:
|
||||
src: pub_evolix.asc
|
||||
dest: "{{ apt_keyring_dir }}/pub_evolix.asc"
|
||||
force: yes
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Evolix public list is installed
|
||||
ansible.builtin.template:
|
||||
src: evolix_public.list.j2
|
||||
dest: /etc/apt/sources.list.d/evolix_public.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_evolix_public
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
tags:
|
||||
- apt
|
||||
when: apt_evolix_public is changed
|
@ -1,45 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Look for legacy apt keyring
|
||||
stat:
|
||||
path: /etc/apt/trusted.gpg
|
||||
register: _trusted_gpg_keyring
|
||||
tags:
|
||||
- apt
|
||||
# Backward compatibility task file
|
||||
|
||||
- name: Evolix embedded GPG key is absent
|
||||
apt_key:
|
||||
id: "B8612B5D"
|
||||
keyring: /etc/apt/trusted.gpg
|
||||
state: absent
|
||||
when: _trusted_gpg_keyring.stat.exists
|
||||
tags:
|
||||
- apt
|
||||
- name: Install Evolix Public repositories (Debian <12)
|
||||
ansible.builtin.import_tasks: evolix_public.oneline.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Add Evolix GPG key
|
||||
copy:
|
||||
src: pub_evolix.asc
|
||||
dest: "{{ apt_keyring_dir }}/pub_evolix.asc"
|
||||
force: yes
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Evolix public list is installed
|
||||
template:
|
||||
src: evolix_public.list.j2
|
||||
dest: /etc/apt/sources.list.d/evolix_public.list
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: apt_evolix_public
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Apt update
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: apt_evolix_public is changed
|
||||
tags:
|
||||
- apt
|
||||
- name: Install Evolix Public repositories (Debian >=12)
|
||||
ansible.builtin.import_tasks: evolix_public.deb822.yml
|
||||
when:
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
@ -1,52 +1,116 @@
|
||||
---
|
||||
|
||||
- name: "Compatibility check"
|
||||
fail:
|
||||
msg: only compatible with Debian >= 8
|
||||
when:
|
||||
- ansible_distribution != "Debian" or ansible_distribution_major_version is version('8', '<')
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version is version('8', '>=')
|
||||
msg: Only compatible with Debian >= 8
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: "apt-transport-https is installed for https repositories (before Buster)"
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- apt-transport-https
|
||||
tags:
|
||||
- apt
|
||||
when: ansible_distribution_major_version is version('10', '<')
|
||||
|
||||
- name: "certificates are installed for https repositories"
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- ca-certificates
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Custom configuration
|
||||
include: config.yml
|
||||
ansible.builtin.import_tasks: config.yml
|
||||
when: apt_config | bool
|
||||
tags:
|
||||
- apt
|
||||
|
||||
- name: Install basics repositories
|
||||
include: basics.yml
|
||||
when: apt_install_basics | bool
|
||||
- name: Install basics repositories (Debian <12)
|
||||
ansible.builtin.import_tasks: basics.oneline.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
- apt_install_basics | bool
|
||||
- ansible_distribution_major_version is version('12', '<')
|
||||
|
||||
- name: Install APT Backports repository
|
||||
include: backports.yml
|
||||
when: apt_install_backports | bool
|
||||
- name: Install basics repositories (Debian >=12)
|
||||
ansible.builtin.import_tasks: basics.deb822.yml
|
||||
tags:
|
||||
- apt
|
||||
when:
|
||||
- apt_install_basics | bool
|
||||
- ansible_distribution_major_version is version('12', '>=')
|
||||
|
||||
- name: Install Evolix Public APT repository
|
||||
include: evolix_public.yml
|
||||
when: apt_install_evolix_public | bool
|
||||
- name: Install backports repositories (Debian <12)
|
||||
ansible.builtin.import_tasks: backports.oneline.yml
|
||||