Re: [ansible-project] Ansible reporting wrong service status
Thanks for your suggestion. Regards, Sidh On Thursday, February 8, 2018 at 5:49:52 PM UTC+1, Kai Stian Olstad wrote: > > On Thursday, 8 February 2018 16.26.07 CET Sidh wrote: > > Ansible - 2.4 > > > > With below snippet, service failed to start at remote host but ansible > > reports that lighttpd service has been restarted and ok. > > > > > > > > - name: lighttpd config file > > template: > > src: lighttpd.conf.j2 > > dest: /etc/lighttpd/lighttpd.conf > > owner: root > > group: root > > mode: 0644 > > notify: Restart lighttpd > > > > handlers: > > - name: Restart lighttpd > > become: true > > service: name=lighttpd state=restarted > > > > > > > > > > Note: It's happening with lighttpd only. > > > > RUNNING HANDLER [Restart lighttpd] > > > *** > > > > changed: [HOSTNAME] > > > > The init system on the host is reporting OK(return code 0) so Ansible says > everything is OK. > If that's not correct then you need to fix the init file/configuration. > > > -- > Kai Stian Olstad > -- 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/0a3509f2-1a10-4b60-b19a-aa992f9e1076%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-project] Ansible reporting wrong service status
On Thursday, 8 February 2018 16.26.07 CET Sidh wrote: > Ansible - 2.4 > > With below snippet, service failed to start at remote host but ansible > reports that lighttpd service has been restarted and ok. > > > > - name: lighttpd config file > template: > src: lighttpd.conf.j2 > dest: /etc/lighttpd/lighttpd.conf > owner: root > group: root > mode: 0644 > notify: Restart lighttpd > > handlers: > - name: Restart lighttpd > become: true > service: name=lighttpd state=restarted > > > > > Note: It's happening with lighttpd only. > > RUNNING HANDLER [Restart lighttpd] > *** > changed: [HOSTNAME] > The init system on the host is reporting OK(return code 0) so Ansible says everything is OK. If that's not correct then you need to fix the init file/configuration. -- Kai Stian Olstad -- 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/7719182.df7thQjv89%40x1. For more options, visit https://groups.google.com/d/optout.
[ansible-project] Ansible reporting wrong service status
Ansible - 2.4 With below snippet, service failed to start at remote host but ansible reports that lighttpd service has been restarted and ok. - name: lighttpd config file template: src: lighttpd.conf.j2 dest: /etc/lighttpd/lighttpd.conf owner: root group: root mode: 0644 notify: Restart lighttpd handlers: - name: Restart lighttpd become: true service: name=lighttpd state=restarted Note: It's happening with lighttpd only. RUNNING HANDLER [Restart lighttpd] *** changed: [HOSTNAME] -- 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/f8026166-d603-4e5a-94d5-5974fde337cf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.