Hi Team,
Am automating my TIbco EMS restart service using Ansible. I have tried to
execute the shell script from the server where ansible installed and also
remote server but the service is not coming up also not getting any error,
the same script execution was successful if run shell script in both Remote
and Ansible server. Please help.
My Play book.
---
- hosts: all
remote_user: tibco
tasks:
- name: Start the EMS services
script: TibemsStatus.sh {{emsserver}} {{actions}}
register: startemsoutput
- debug:
var: startemsoutput.stdout_lines
My Shell script
case "$2" in
start)
if [ $PID ]; then
echo "ems is already running for config file $conf_file.
Check process id $PID";
else
echo "Starting tibems daemon for config file $conf_file."
# cd $TIBEMS_ROOT && ./tibemsd64 -config $conf_file >
/dev/null 2>&1 &
(/opt/tibco/ems/8.3/bin/tibemsd64 -config $conf_file >
/dev/null 2>&1 &) && exit
sleep 5
PROCESS_PID;
if [ $PID ]; then
echo "Done. Started ./tibemsd64 -config $conf_file
The process id is [ $PID ]"
else
echo "Could not start ./tibemsd64 on this box for
config $conf_file"
fi
fi
Regards,
Makesh.
--
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/33e6ab40-b441-432a-bdee-6a9dc48df194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.