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/e27af20a-0490-411a-b1fb-1afd1dad969f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.