So I played around a bit more with this and it seems to be happening for 
all of the services in my playbook. Is it possible this is a bug? All works 
fine the first time through, but once Ansible starts a service, it never 
looks at it again unless you call Restart or Stop. It seems it would be 
good to have it make sure the service is actually running.

Can anyone verify they're seeing the same thing?

On Monday, March 24, 2014 4:17:16 PM UTC-7, Adam Morris wrote:
>
>
>
> On Monday, March 24, 2014 3:44:39 PM UTC-7, James Goodhouse wrote:
>>
>> Hey All,
>>
>> I'm having some issues getting a service to start and wanted to make sure 
>> I'm not doing something stupid.
>>
>>
> Ummm, That's kind of hard to say without knowing what you are doing... 
>  This is not an RTFM response, so please read it and see if this helps, or 
> if you can at least answer the questions so that we can (possibly) help you.
>
>  
>
>> I'm installing varnish and then using the service module to start and 
>> enable varnish.
>>
>>     - name: start and enable service
>>       service: name=varnish state=started
>>
>> All seems fine when I do a fresh provision of a box. The issue I'm seeing 
>> is that if I log into the box and stop the service and re-provision, I get 
>> a green light at the task and the service never gets started.
>>
>>
> Which version of Ansible are you using? What OS are you running the task 
> against? How are you stopping the service?  What do you mean by 
> re-provision?
>
> In particular I'm wondering if you are killing the varnish service so that 
> it is no longer running and then the script is checking to see if the 
> system thinks that varnish is running (there is still a lock file or 
> something sitting around).  If that is the case then Ansible doesn't know 
> that it is not running, so it doesn't start it.
>
> By the way, that just starts varnish, to enable it at boot time you would 
> use
>  
> - name: Start and Enable Varnish
>   service: name=varnish state=started enabled=yes
>
> I hope that this helps,
>
>      Adam
>
>

-- 
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/33bcd9a9-63b9-49a1-b3dc-01900f190abc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to