title: Ansible: disable service only if present
body: <p>Is there any nice way to do disable and stop a service, but only if it's installed on server? Something like this:</p>
  
  <pre><code>- service: name={{ item }} enabled=no state=stopped only_if_present=yes
    with_items:
    - avahi-daemon
    - abrtd
    - abrt-ccpp
  </code></pre>
  
  <p>Note that "only_if_present" is a keyword that doesn't exist right now in Ansible, but I suppose my goal is obvious.</p>