Forum Discussion
Error when running bigip_command Playbook against LTM : Syntax Error: unexpected argument /bin/sh\n
do you have that “/bin/sh”\n’ in the ansible file?
if no, probably you ansible input file contains DOS format line ending (\r\n) which different from unix format (\n).
use "dos2unix" command to quickly remove the "\r".
you can also try to change builtin shell to /bin/bash because anyway /bin/sh is actually link to /bin/bash in F5.
[root@ltm1:Active:Standalone] config # ls -la /bin/sh
lrwxrwxrwx. 1 root root 4 Dec 1 11:57 /bin/sh -> bash
[root@ltm1:Active:Standalone] config # ls -la /bin/bash
-rwxr-xr-x. 1 root root 964584 Dec 1 10:37 /bin/bash
[root@ltm1:Active:Standalone] config #
Thank for your reply. I tried adding executable = /bin/bash to ansible.cfg but it produced the same error but with bash:
Syntax Error: unexpected argument "/bin/bash"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
