Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
Awesome, thank you very much! On Thursday, August 13, 2020 at 1:47:07 PM UTC-4, Vladimir Botka wrote: > > Laci, > > On Thu, 13 Aug 2020 08:47:31 -0700 (PDT) > Laci > wrote: > > > ... it finds the package only if no specific version is > > specified. For example it will find nginx and send

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Vladimir Botka
Laci, On Thu, 13 Aug 2020 08:47:31 -0700 (PDT) Laci wrote: > ... it finds the package only if no specific version is > specified. For example it will find nginx and send email but won't > find nginx-1.12.2 Try this. Loop "with_together" lists of packages' names and versions. In the task's

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
Thank you Vladimir! This looks almost good, it finds the package only if no specific version is specified. For example it will find nginx and send email but won't find nginx-1.12.2 On Thursday, August 13, 2020 at 11:09:22 AM UTC-4, Vladimir Botka wrote: > > On Thu, 13 Aug 2020 07:20:51 -0700

Re: [ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Vladimir Botka
On Thu, 13 Aug 2020 07:20:51 -0700 (PDT) Laci wrote: > I'm looking for a playbook which would scan all servers and if a particular > package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would send > an email with the hostname. > Did anyone do something alike? Collect "pkg_facts"

[ansible-project] scan servers if package is installed and send email

2020-08-13 Thread Laci
I'm looking for a playbook which would scan all servers and if a particular package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would send an email with the hostname. Did anyone do something alike? -- You received this message because you are subscribed to the Google Groups