---
# tasks file for ansible_common

- name: Assert
  assert:
    that: ansible_os_family in [ 'Debian', 'OpenBSD' ]

- include: backports.yml
  when: backports|default(False) and ansible_os_family == 'Debian' and not common_role_finished is defined

- include: tls_cert.yml
  when: tls_cert|default(True) and not common_role_finished is defined

- include: add_tls_cert.yml
  when: not common_role_finished is defined

- include: syslog_forward.yml
  when: syslog_server is defined and not common_role_finished is defined

- include: collectd_agent.yml
  when: (collectd_graphite_server is defined or collectd_riemann_server is defined or collectd_collectd_server is defined or collectd_statsd_server is defined) and not common_role_finished is defined

- set_fact:
    common_role_finished: True
