probably because you have sh on the command. Probably better if you pass the whole directory to jetty.sh restart. Like /apps/servers/jetty/bin/jetty.sh restart
On Wed, Sep 25, 2019 at 9:58 AM Madushan Chathuranga < mchathuran...@gmail.com> wrote: > Hi All, > > I'm trying to restart jetty using an ansible script > > bellow is a snippet from my script > > --- > - hosts: all > tasks: > > > - name: start jetty > command: sh jetty.sh restart > args: > chdir: /apps/servers/jetty/bin > > my inventory file is > 10.0.18.225 ansible_user=appusr ansible_ssh_private_key_file=/home/ec2- > user/key > > > What happens is ansible is able to restart the jetty server as expected. > but once ansible script done it's execution jetty server stops. > Any Ideas why this would happen. I don't have the luxury to start jetty as > a service here 'jetty start'. There are no error or sigkills in the jetty > logs. ansible also shows Jetty Start : OK in it's stdrr output. Would be > great if anyone could help me with this. > > Thanks. > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/ad1172d1-4cc0-4435-98e0-697fad20bfcb%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/ad1172d1-4cc0-4435-98e0-697fad20bfcb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Jonathan Cha'gara Lozada De La Matta He / Him / His Red Hat <https://www.redhat.com> Senior Automation Practice Consultant & Automation CoP Manager Join the Automation CoP! https://red.ht/autocop @redhatjobs <https://twitter.com/redhatjobs> redhatjobs <https://www.facebook.com/redhatjobs> @redhatjobs <https://instagram.com/redhatjobs> <https://www.redhat.com> -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFYJA%2B%2B4cUtJeT%3DoWL1HqZ1Ee7OBEdKVk1DkiyR85tKtfhNN%2BA%40mail.gmail.com.