On 03. juni 2016 21:43, Johannes Kastl wrote:
On 03.06.16 20:25 Mike Fennemore wrote:
You could use register: to register a variable for the result then use debug: var= <your 
registered variable>.<property you want>

But if starting the service fails, shouldn't ansible report the task
as failed?

Yes, and Ansible would do that, but the problem is that the init script is reporting everything is OK when it isn't.

So you have some options,
- fix the init script or,
- use ansible shell or command to check if the process is running or,
- use the service command a second time and fail it if the second one also report changed.

--
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 [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/5752D758.9060500%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to