Hi,
I would like to use ansible to execute commands on a host.
This works
ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last kernel"
This does not work as expected the output of rpm is given as the final
output. I would like to filter the output further.
ansible -i ./ec2.p
On Tuesday, 27 March 2018 15.50.48 CEST Abey Thomas wrote:
> I would like to use ansible to execute commands on a host.
>
> This works
> ansible -i ./ec2.py 192.168.108.53 -s -u ansible -a "rpm -qa --last kernel"
>
> This does not work as expected the output of rpm is given as the final
> out
Hi Kai,
Did not know that I had use shell. Thanks . Works OK.
ansible -i ./ec2.py 192.168.108.53 -m shell -s -u ansible -a "rpm -qa
--last | grep kernel"
Regards,
Abey
On Tuesday, March 27, 2018 at 2:54:19 PM UTC+1, Kai Stian Olstad wrote:
>
> On Tuesday, 27 March 2018 15.50.48 CEST Abey Thom