LemmyNet / lemmy-ansible

A docker deploy for ansible
GNU Affero General Public License v3.0
248 stars 92 forks source link

Error updating from 0.18.4 to 0.18.5 #182

Closed skariko closed 1 year ago

skariko commented 1 year ago

OS Version: Ubuntu 22.04 apt sources:

deb http://it.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://it.archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://it.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy universe
deb http://it.archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://it.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://it.archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://it.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://it.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Hello, I followed the instructions to update Lemmy to 0.18.5 from 0.18.4 while also updating Ansible to 1.2.0 but when running the playbook I get the following error:

Failed to connect to the host via ssh: 
The full traceback is:
  File "/tmp/ansible_ansible.builtin.apt_payload_h9t4p6b0/ansible_ansible.builtin.apt_payload.zip/ansible/modules/apt.py", line 1165, in get_cache
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 152, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 214, in open
    self._cache = apt_pkg.Cache(progress)
fatal: [95.216.207.196]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "allow_change_held_packages": false,
            "allow_downgrade": false,
            "allow_unauthenticated": false,
            "autoclean": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "clean": false,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "fail_on_autoremove": false,
            "force": false,
            "force_apt_get": false,
            "install_recommends": null,
            "lock_timeout": 60,
            "name": "aptitude",
            "only_upgrade": false,
            "package": [
                "aptitude"
            ],
            "policy_rc_d": null,
            "purge": false,
            "state": "present",
            "update_cache": true,
            "update_cache_retries": 5,
            "update_cache_retry_max_delay": 12,
            "upgrade": null
        }
    },
    "msg": "E:Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/ubuntu/ jammy: /etc/apt/keyrings/docker.asc != /etc/apt/trusted.gpg.d/docker.asc, E:The list of sources could not be read."
}
skariko commented 1 year ago

I solved this issue with this operation:

on the remote host i delete these:

/etc/apt/keyrings/docker.asc

/etc/apt/trusted.gpg.d/docker.asc

/etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list

codyro commented 1 year ago

I'm re-opening this as this may be something we should address/document. This would have been related to the change in https://github.com/LemmyNet/lemmy-ansible/pull/148/files#diff-e4784d62230b01011d29cbfe8fe5af0f283a9e46929a676e646a580776c35b69R80

codyro commented 1 year ago

This looks like it was caused by the user installing Docker outside of our Ansible playbooks, resulting in conflicts.

Thanks for the report, @skariko!