Commit 4a96ed76 authored by Jérome Perrin's avatar Jérome Perrin

repository: remove old http repository to prevent a warning

In 6a03cf9e (playbook: use https for OBS, 2022-09-02) we added https
repository, but without removing the old http repository, as a consequence,
when re-running the playbook, we end up with two lines:

    $ cat /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list
    deb http://download.opensuse.org/repositories/home:/VIFIBnexedi//Debian_11/ ./
    deb https://download.opensuse.org/repositories/home:/VIFIBnexedi//Debian_11/ ./

and running apt update issues warning:

    W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:1 and /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:2
    W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:1 and /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:2
    W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:1 and /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:2
    W: Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:1 and /etc/apt/sources.list.d/download_opensuse_org_repositories_home_VIFIBnexedi_Debian_11.list:2

this also tells ansible to remove the old http repository that might be here for debian 11
parent 6e1ef23f
......@@ -35,6 +35,10 @@
apt_repository: repo='deb {{ base_open_build_url }}/Debian_11/ ./' state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "11"
- name: Remove insecure http Debian 11 repository
apt_repository: repo='deb {{ base_open_build_url_http }}/Debian_11/ ./' state=absent
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "11"
- name: Install Debian 10 repository
apt_repository: repo='deb {{ base_open_build_url }}/Debian_10/ ./' state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"
......
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