You can use package facts for that:
https://docs.ansible.com/ansible/latest/modules/package_facts_module.html
On Wednesday, February 5, 2020 at 10:27:01 AM UTC+1, Stefan Hornburg
(Racke) wrote:
>
> On 2/5/20 9:48 AM, Adrian Sebastian Dutu wrote:
> > Why are you using the command module?
> >
>
Thanks for the update. I was able to figure it out!
--
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
Correct.
There is no package called "yum update".
On Wed, 5 Feb 2020 at 23:07, Work-Hard wrote:
>
> So, I am breaking it down in the playbook - it doesn't like spaces in name
> of the package?
> playbook:
> ---
> - hosts: amazonlinux2
> become: true
> any_errors_fatal: true
> serial: 1
>
So, I am breaking it down in the playbook - *it doesn't like spaces in
name of the package?*
*playbook:*
---
- hosts: amazonlinux2
become: true
any_errors_fatal: true
serial: 1
max_fail_percentage: 0
vars:
ansible_user: ec2-user
tasks:
# do an "yum update", to ensure latest pa
On 2/5/20 9:48 AM, Adrian Sebastian Dutu wrote:
> Why are you using the command module?
>
> Use the package module. Then it will not matter what package manager the
> distro is running.
> If you have ansible module available for what you want to do, never use
> command. I would rewrite the entir
Why are you using the command module?
Use the package module. Then it will not matter what package manager the
distro is running.
If you have ansible module available for what you want to do, never use
command. I would rewrite the entire play.
On Wednesday, February 5, 2020 at 2:08:01 AM UTC+