Alternatively, something like this:

vars:
   openais_enabled: "{% if enable_service_address is defined and
enable_service_address %}yes{% else %}no{% endif %}
   openais_running: "{% if enable_service_address is defined and
enable_service_address %}running{% else %}stopped{% endif %}

and in tasks:

- name: be sure openais is running and enabled
  service: name=openais state={{ openais_running }} enabled={{
openais_enabled }}

I'm not sure I really like that, as the conditional is a bit thick, though.

More so just sharing for completeness.


On Mon, Jan 5, 2015 at 6:27 AM, Jon Warbrick <j...@cam.ac.uk> wrote:

> On Wed, 17 Dec 2014, Brian Coca wrote:
>
>  not currently, what you have is what works.
>>
>
> Ta. At least I wasn't missing something obvious...
>
>
> Jon.
>
> --
> Jon Warbrick
> Information Systems Manager, University of Cambridge Information Services
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzzLuVcd_x84sw1qPxn9P0xNRMqF3HyHv4cAwtWRth9eQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to