Hello,

If you are trying to avoid certain known packages to be upgraded, you could
try to pin them:

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dpkg_selections_module.html

Nuno Jordão

On Sun, Feb 21, 2021 at 9:49 PM [email protected] <[email protected]>
wrote:

> I am thinking like below
>
>
> cat /etc/apt/sources.list |grep -v "#"
>
>
>
> deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
>
> deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
>
> deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
> deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
>
> deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
> deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
>
> deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted
> universe multiverse
>
>
>
>
> #######################################
>
>
> except blank output ..
>
> cat /etc/apt/sources.list |grep -v "#" |grep -v ubuntu
>
>
>
>
>
>
> #######################################
>
> anything out of box better way .. i think if this is not in place would be
> a really good feature request for APT/Yum module authors ..
>
>
> On Sunday, February 21, 2021 at 1:40:53 PM UTC-8 [email protected] wrote:
>
>> Hello
>> Is there any way to target only primary OS related packages ?
>>
>>
>> - name: Update all packages to their latest version
>> apt:
>> name: "*"
>> state: latest
>>
>> At times 3rd Party packages are added to /etc/apt/sources.list
>>
>> So what is best way to just patch the OS & not the app..
>>
>> Any suggestions to handle this on scale ..
>>
>> Thanks
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ff56ea73-6926-46f5-ba86-a63b2f018c71n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ff56ea73-6926-46f5-ba86-a63b2f018c71n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAEAA%3DtvQvP3qAmhz%2BRhBfoBH3xhEf3vZAfE%2BSdtadeFoUBo4cA%40mail.gmail.com.

Reply via email to