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/6ad33dbd-225f-4740-b641-c5e971e2e917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.