Re: [ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-20 Thread Johannes Kastl
On 20.01.17 09:27 sgamp...@criterionnetworks.com wrote: > I tried using complete command "onos-karaf clean" as well but its > not working its giving me same error as you can see > > error message: failed: [192.168.2.129] (item=onos-karaf clean) => > {"cmd": "onos-karaf clean", "failed": true,

[ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-20 Thread sgampawa
I tried using complete command "onos-karaf clean" as well but its not working its giving me same error as you can see error message: failed: [192.168.2.129] (item=onos-karaf clean) => {"cmd": "onos-karaf clean", "failed": true, "item": "onos-karaf clean", "msg": "[Errno 2] No such file or

Re: [ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-19 Thread Johannes Kastl
On 20.01.17 08:26 sgamp...@criterionnetworks.com wrote: > Hi Johannnes, > > I tried 'alias ok' its giving me output "onos-karaf" thats ok. No, it explains your problem. You can use 'ok' as command as a user, but ansible cannot. It does not know your alias. Use the full name and the task will

[ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-19 Thread sgampawa
Hi Johannnes, I tried 'alias ok' its giving me output "onos-karaf" thats ok.And yes this happening because of change of environment.So instead of running command using ansible I am thinking of writing simple python script which will run this ''ok clean'' command whenever I execute

Re: [ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-18 Thread Johannes Kastl
On 18.01.17 13:46 sgamp...@criterionnetworks.com wrote: > This 'ok' means 'onos-karaf', When I execute 'ok > clean' in my remote VM which is having onos installed in it. I There is your problem. I guess you have some kind of alias in your VM that lets you use ok without errors. Ansible does not

[ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-18 Thread sgampawa
Hi Johannes, This 'ok' means 'onos-karaf', When I execute 'ok clean' in my remote VM which is having onos installed in it. It used to run clean up Job and runs the new session of onos. In short it used to run onos controller installed in remote machine. Please consider this example

Re: [ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-18 Thread Johannes Kastl
Hi there, On 18.01.17 12:49 sgamp...@criterionnetworks.com wrote: > tasks: - name: running ok clean command: ok clean What kind of command is 'ok'? Is this your actual executable? In your previous examples I assumed it was called 'onos'. > "[Errno 2] No such file or directory", "rc": 2} Your

[ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-18 Thread sgampawa
Hi Johannes, As you can see in latest post I ran playbooks by adding quotes in it, But still I getting error. Do you have any idea why I am getting this error ? Is that I am missing something ? - shubham On Tuesday, January 17, 2017 at 4:07:35 PM UTC+5:30,

[ansible-project] Re: Getting Error while executing Commands having space in command module and shell module

2017-01-18 Thread sgampawa
Yes Dick, I tried that way as well still I am getting same error as you can see my playbook playbook: --- - hosts: atrium gather_facts: no tasks: - name: running ok clean command: ok clean chdir=/home/admin/onos warn=no register: result - debug: