---

- name: reload squid
  service: name=squid state=reloaded

- name: restart squid
  service: name=squid state=restarted

- name: restart ufdb
  service: name={{ squid_ufdb_unit.stat.exists | ternary('ufdbGuard','ufdb') }} state={{ squid_filter_url | ternary('restarted', 'stopped') }}

- name: update ufdb
  command: /usr/local/bin/ufdb_update.sh
  notify: restart ufdb

- name: restart ufdb
  service: name={{ squid_ufdb_unit.stat.exists | ternary('ufdbGuard','ufdb') }} state={{ squid_filter_url | ternary('reloaded', 'stopped') }}
