But using the service module isn't quite that simple, right? You have to
set up your init script to identify the services that the module would
call. That's where I'm at currently.
On Sunday, May 1, 2016 at 2:49:44 PM UTC-6, Rick O'Shea wrote:
>
> We have host groups whose service states we wish to automate.
>
> - name manage service
> service: name=foo state={{state}}
>
> As near as we can tell this is the only way to automate a playbook to
> start, stop, restart, enable, disable or status a service is to pass a
> variable on the command line:
>
> ansible-playbook foo-service.yml -e state=started
>
> Is this best practice?
>
>
>
>
--
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/fcac4a90-1072-49d8-b9b4-afab5656cec8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.