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 esxi...@gmail.com 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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ff56ea73-6926-46f5-ba86-a63b2f018c71n%40googlegroups.com.

Reply via email to