Re: [ansible-project] Starting nrpe client using ansible task

2017-12-13 Thread Brian Coca
Normally you don't want to use command/shell to start services, as they
will probably kill the service when the task ends.

Using an init system (sysv init scripts, systemd) is normally much better
and more reliable.

IF you still want to use the command/shell way, you should use nohup and
background the service to avoid killing it on task end.


-- 
--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7eDd6jpOdWp5se-ZQf%3DyLKT_8tC5_sEUwTV7LhY6h7hyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Starting nrpe client using ansible task

2017-12-12 Thread Varun Raj c v
I have written an ansible playbook to automate setup of nrpe 2.12 client 
which we use. The last step of the task is to start nrpe client as nagios 
user. 

### starting nrpe 
- name: go to INIT.D and start nrpe
become: yes
become_user: nagios
command: ./nrpe-server start
args:
chdir: /opt/app/nrpe-2.12/init.d
We have the ansible git repo being invoked from GOCD. In GOCD console, I am 
not finding any errors.

TASK [nrpe : go to INIT.D and start nrpe] 
**
changed: [96.118.233.22]

When i login to server, it shows nrpe is running, but I am unable to see 
the nrpe process. I am unable to figure out what mistake am committing 
here. Would appreciate any help with this ?

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2ac49cec-7179-43a7-8dd8-f1fc878a27a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.