Sudo service filebeat start does not work when running script remote with ansible.
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, May 2 2018, 18:31:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Filebeat version is current latest version 6.4
I run the following code from remote,
unbuffer ansible all -i /tmp/hosts_-4972515539809608044 --private-key=/tmp/tmpfiledeploytask5639761060323527345wowzee -u ec2-user -m script -a filebeatStart.sh
my script is:
sudo service filebeat start
filebeat start to send logs to elasticsearch. After 100 second passes and ansible close session, all daemonized process also die.
There are some issues in 2016's and they solved the problem caused by daemon stream. However, I still face with same problem when use script module of ansible.
Thank you in advance