In the playbook 00_offline_prepare.yml the task name: Copy apt config cannot be applied.
TASK [Copy apt config] ************************************************************************************************************************ An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option fatal: [home-mono]: FAILED! => {"changed": false, "msg": "Could not find or access '/etc/apt/sources.list' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
After investigation the file /etc/apt/sources.list doesnt exist in Debian12 container
docker run --rm -it debian:12 ls -l /etc/apt
total 24
drwxr-xr-x 2 root root 4096 Nov 20 00:00 apt.conf.d
drwxr-xr-x 2 root root 4096 May 25 2023 auth.conf.d
drwxr-xr-x 2 root root 4096 May 25 2023 keyrings
drwxr-xr-x 2 root root 4096 May 25 2023 preferences.d
drwxr-xr-x 2 root root 4096 Nov 20 00:00 sources.list.d
drwxr-xr-x 2 root root 4096 Nov 20 00:00 trusted.gpg.d
The equivalent of the source.list in debian12 is managed here /etc/apt/sources.list.d/debian.sources
while it exists on Debian11 the file source.list exists
docker run --rm -it debian:11 ls -l /etc/apt
total 24
drwxr-xr-x 2 root root 4096 Nov 20 00:00 apt.conf.d
drwxr-xr-x 2 root root 4096 Jun 10 2021 auth.conf.d
drwxr-xr-x 2 root root 4096 Jun 10 2021 preferences.d
-rw-r--r-- 1 root root 430 Nov 20 00:00 sources.list
drwxr-xr-x 2 root root 4096 Jun 10 2021 sources.list.d
drwxr-xr-x 2 root root 4096 Nov 20 00:00 trusted.gpg.d
My question is "what is the interest of this task" which copy the source.list on the target ?
In the playbook
00_offline_prepare.yml
the taskname: Copy apt config
cannot be applied.TASK [Copy apt config] ************************************************************************************************************************ An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option fatal: [home-mono]: FAILED! => {"changed": false, "msg": "Could not find or access '/etc/apt/sources.list' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
After investigation the file
/etc/apt/sources.list
doesnt exist in Debian12 containerThe equivalent of the
source.list
in debian12 is managed here/etc/apt/sources.list.d/debian.sources
while it exists on Debian11 the file
source.list
existsMy question is "what is the interest of this task" which copy the source.list on the target ?