Thanks for your response Brian. I think I'm using docker exec which support &&, please find the screenshot attached.
[image: Screen Shot 2018-12-11 at 12.37.23 PM.png] <about:invalid#zClosurez> Like, if I run this command - docker exec -it apache bash -c "/usr/local/apache2/bin/httpd -t && echo a" ,then it execute properly. But, once I'm trying to run this - docker exec -it apache bash -c "/usr/local/apache2/bin/httpd -t && /bin/kill -s USR1 apache" ,then 1st command is getting executed but 2nd command is giving error as I used 'docker exec' to get into the container and it can't reload the apache staying inside of container. *Output:* [root@### ~]$ docker exec -it apache bash -c "/usr/local/apache2/bin/httpd -t && /bin/kill -s USR1 apache" Syntax OK kill: failed to parse argument: 'apache' FYIP, apache is a container running on the host. On Tuesday, December 11, 2018 at 12:31:56 PM UTC-6, Brian Coca wrote: > > First i would make this a script and use the 'script' module, but the > issue you are probably hitting is that 'command' does not support > 'shellisms' like &&, so you need to use the shell module > > > > > -- > ---------- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4b6ff12e-02ba-423d-9cc2-21de38e5033a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
