Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Script can't read docker.asc file #279

Open
MoonSmiley opened this issue Feb 7, 2024 · 4 comments
Open

Script can't read docker.asc file #279

MoonSmiley opened this issue Feb 7, 2024 · 4 comments
Assignees

Comments

@MoonSmiley
Copy link

MoonSmiley commented Feb 7, 2024

Describe the issue
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt_pkg.Error: E:Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/debian/ bookworm: /etc/apt/keyrings/docker.asc != /etc/apt/trusted.gpg.d/docker.asc, E:The list of sources could not be read.
fatal: [localhost]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File "", line 16, in
File "", line 226, in run_module
File "", line 98, in _run_module_code
File "", line 88, in _run_code
File "/tmp/ansible_apt_repository_payload_nihe22ao/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py", line 765, in
File "/tmp/ansible_apt_repository_payload_nihe22ao/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py", line 742, in main
File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in init
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
self._cache = apt_pkg.Cache(progress)
^^^^^^^^^^^^^^^^^^^^^^^
apt_pkg.Error: E:Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/debian/ bookworm: /etc/apt/keyrings/docker.asc != /etc/apt/trusted.gpg.d/docker.asc, E:The list of sources could not be read.
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1

File Permissions:
-rw-r--r-- 1 root root 3817 Feb 7 16:58 /etc/apt/keyrings/docker.asc

Environment:

  • Client OS: Windows 11 Pro
  • VPS OS : Debian 12 (arm64)
  • VPS Provider: Hetzner
@TheBlindHacker
Copy link

I am getting this during testing on Debian 12 as root....

@TheBlindHacker
Copy link

Fixed my issue by downgrading to Debian 11 works fine

@Wolfoverflow
Copy link

I had a similar issue on Ubuntu 22.04, the solution was editing the file at /etc/apt/sources.list.d/docker.list and removing every line except for deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/docker.asc] https://download.docker.com/linux/ubuntu/ jammy stable

@stankovicst
Copy link

stankovicst commented Mar 4, 2024

@Wolfoverflow @notthebee did not work for me. I have this error:

TASK [geerlingguy.docker : Add Docker repository.] *****************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt_pkg.Error: E:Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/ubuntu/ focal: /etc/apt/trusted.gpg.d/docker.asc != , E:The list of sources could not be read.
fatal: [localhost]: FAILED! => changed=false
module_stderr: |-
Traceback (most recent call last):
File "", line 16, in
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_apt_repository_payload_n2kexhpf/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py", line 679, in
File "/tmp/ansible_apt_repository_payload_n2kexhpf/ansible_apt_repository_payload.zip/ansible/modules/apt_repository.py", line 656, in main
File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in init
self.open(progress)
File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
self._cache = apt_pkg.Cache(progress)
apt_pkg.Error: E:Conflicting values set for option Signed-By regarding source https://download.docker.com/linux/ubuntu/ focal: /etc/apt/trusted.gpg.d/docker.asc != , E:The list of sources could not be read.
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants