Commit 1d4eb790 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook: allow release info change when doing apt update

In old Debian 10, after the release of Debian 11, apt update is failing
like this if we don't add the option "--allow-releaseinfo-change":

root@debian:~# apt update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://http.us.debian.org/debian buster InRelease [122 kB]
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
parent 2b9f5e0a
- name: Allow release-info to change for APT repositories
command: apt-get update -y --allow-releaseinfo-change
when: ansible_os_family == "Debian" or ansible_os_family == "Linuxmint"
- apt: name=gpg state=present - apt: name=gpg state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10" when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"
--- ---
dependencies: dependencies:
- { role: ntp } - { role: ntp }
- { role: package, package_name: slapos-node, package_state: latest }
- name: Install slapos.node using apt
apt: name=slapos-node state={{ package_state }} update_cache=yes cache_valid_time=3600
when: ansible_os_family == "Debian"
- name: Install slapos.node using yum
yum: name=slapos.node state={{ package_state }} update_cache=yes
when: ansible_os_family == "RedHat"
- name: Check if configuration exists already - name: Check if configuration exists already
stat: path=/etc/opt/slapos/slapos.cfg stat: path=/etc/opt/slapos/slapos.cfg
register: slapos_cfg register: slapos_cfg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment