Package: ansible
Version: 2.10.7+merged+base+2.10.8+dfsg-1
Severity: normal
Hi,
when using a Deb822 style sources file in apt, such as:
$ cat /etc/apt/sources.list.d/docker-stable.sources
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: bullseye
Components: stable
Signed-By: /etc/apt/docker.gpg
$
ansible code like:
- name: configure apt - remove transitional packages
apt:
name: "{{ packages }}"
state: "absent"
vars:
packages:
- iproute
fails with:
fatal: [corte]: FAILED! => {"changed": false, "msg": "E:Malformed stanza 1 in source list /etc/apt/sources.list.d/docker-stable.sources (type), E:The list of sources could not be read."}
Expected behavior would be the ansible run to succeed.
Greetings
Marc
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.16.9-zgws1 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages ansible depends on:
ii openssh-client 1:8.7p1-4
ii python3 3.9.8-1
ii python3-cryptography 3.4.8-1
ii python3-distutils 3.9.10-1
ii python3-dnspython 2.2.0-2
ii python3-httplib2 0.20.2-2
ii python3-jinja2 3.0.3-1
ii python3-netaddr 0.8.0-2
ii python3-packaging 21.3-1
ii python3-paramiko 2.8.1-1
ii python3-pycryptodome 3.11.0+dfsg1-3
ii python3-yaml 5.4.1-1+b1