Unable to run bash command in generic agent

Moderator: crythias

Post Reply
sumitsahaymca
Znuny newbie
Posts: 8
Joined: 06 Feb 2018, 10:46
Znuny Version: OTRS5

Unable to run bash command in generic agent

Post by sumitsahaymca »

Hi All,

I am trying to connect Ansible through OTRS so I created generic agent, in the Execute Command Section I added the one command to ping ansible server it is working fine but other command is not working like running ansible playbook.

Sample command: `ssh username@ip_address ansible all -m -ping > /tmp/ping.log`

above command is working fine but other command is not working.

Any help much appreciated.

Thanks & Regards
Sumit Sahay
sameer615
Znuny newbie
Posts: 38
Joined: 16 Aug 2017, 11:26
Znuny Version: OTRS 5
Real Name: sameer sardar
Company: ENS

Re: Unable to run bash command in generic agent

Post by sameer615 »

can you give a sample command which is not working ???
Last edited by sameer615 on 06 Feb 2018, 15:29, edited 1 time in total.
sumitsahaymca
Znuny newbie
Posts: 8
Joined: 06 Feb 2018, 10:46
Znuny Version: OTRS5

Re: Unable to run bash command in generic agent

Post by sumitsahaymca »

Hi Sameer,

Thanks for your reply, sure

`ssh user_name@ip_address ansible-playbook -i /home/test/hosts usecase_test1.yml -e '{"users_to_add":otrs_test_user6, "hosts":ubuntu}' --limit ubuntu > /tmp/userlogfile2.log`

I am getting the log file created in the tmp folder of 0kb but I am not getting the output in remote host.

Looking forward for your reply.

Thanks & Regards
Sumit Sahay
Post Reply