Hi,

I have for an example an task which enables modules in apache2 in debian 
with the command a2enmod.

So I have:

- name: Debian | Apache | Enable Basic Mods
  command: a2enmod {{ item }}
  with_items:
    - rewrite
    - ssl
  when: "ansible_os_family == 'Debian'"
  tags: apache
  notify:
    - restart apache2

Now I don't wan't to get apache restarted every single time, only if it 
really enabled an module. I can handle such a task as failed with:

register: command_result
failed_when: "'Enabling module' in command_result.stderr"

I would need that but for success not for failing.

Is this possible?


thanks


-- 
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/15ad13dd-952d-473f-a94b-2cc934163f82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to