I am attempting to perform the follow in order to only upgrade ubuntu security updates…
apt: upgrade=yes update_cache=yes dpkg_options=‘Dir::Etc::SourceList=/etc/apt/security.sources.list’
and I receive the following error message…
FAILED! => {“changed”: false, “failed”: true, “msg”: “‘/usr/bin/aptitude safe-upgrade’ failed: E: Sub-process /usr/bin/dpkg returned an error code (2)\nFailed to perform requested operation on package. Trying to recover:\n”, “stdout”: "Reading package lists…\nBuilding dependency tree…\nReading state information…\nReading extended state information…\nInitializing package states…\nBuilding tag database…\nThe following packages will be upgraded:\n apport libc-bin libc6 locales multiarch-support python3-apport \n python3-problem-report snapd \n8 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 0 B/12.8 MB of archives. After unpacking 623 kB will be freed.\nWriting extended state information…\nPreconfiguring packages …\ndpkg: error: unknown option --Dir::Etc::SourceList=/etc/apt/security.sources.list\r\n\r\nType dpkg
I am trying to replicate this functioning command…
apt update && apt-get upgrade -o Dir::Etc::SourceList=/etc/apt/security.sources.list
Any advice on the best way to handle this or some better examples on dpkg_options?
Thank you,
Adam