Re: [ansible-project] command using pipes does not work when using ansible without a playbook

2018-03-27 Thread Abey Thomas
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

Re: [ansible-project] command using pipes does not work when using ansible without a playbook

2018-03-27 Thread Kai Stian Olstad
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 >

[ansible-project] command using pipes does not work when using ansible without a playbook

2018-03-27 Thread Abey Thomas
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