module - ansible shell escape single and double quotes -
i'm trying execute command:
ps -eo pid,args --cols=10000 | awk '/\/opt\/logstash\/logstash-1.5.3\// && $1 != procinfo["pid"] { print $1 }'
whith ansible -m shell module (not working example):
ansible -m shell -a '"'ps -eo pid,args --cols=10000 | awk '/\/opt\/logstash\/logstash-1.5.3\// && $1 != procinfo[\'pid\'] { print $1 }' '"'
one of ways put file, still nice run command - ideas?
bash escaping rules do:
ansible localhost -m shell -a "ps -eo pid,args --cols=10000 | awk '/\\/opt\\/logstash\\/logstash-1.5.3\\// && \$1 != procinfo[\"pid\"] { print \$1 }'"
Comments
Post a Comment