Jérémy Lecour
00fe225a3c
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2615|7|2608|177|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/278//ansiblelint">Evolix » ansible-roles » unstable #278</a>
gitea/ansible-roles/pipeline/head This commit looks good
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
---
|
|
- 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: true
|
|
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: true
|
|
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
|