Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-06 Thread Adrian Sebastian Dutu
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? > > >

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Work-Hard
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

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Dick Visser
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 >

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Work-Hard
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

Re: [ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Stefan Hornburg (Racke)
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

[ansible-project] Re: Migrating playbook from ubuntu to amazon linux 2 - throws error missing dependency: python-apt

2020-02-05 Thread Adrian Sebastian Dutu
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+