Reputation: 19
I created chrooted configuration for stunnel. When I run locally
stunnel /etc/stunnel/stunnel.conf
stunnel started fine and run 6 processes.
When I send the HUP signal locally, stunnel reloaded configuration successfully.
kill -SIGHUP `cat /usr/local/stunnel/stunnel.pid`
When I start it via ansible like this
- name: Start stunnel
command: stunnel /etc/stunnel/stunnel.conf
stunnel started, but there are only 1 process and its services don't work.
When I send the HUP signal from ansible, stunnel not works.
- name: Check stunnel is running
stat:
path: /usr/local/stunnel/stunnel.pid
register: stunnel
- name: get pid
command: cat '/usr/local/stunnel/stunnel.pid'
register: pid
when: stunnel.stat.exists
- name: Reload stunnel configuration.
command: kill -SIGHUP {{ pid.stdout }}
when: stunnel.stat.exists
Upvotes: 0
Views: 32