---
- include: install.packages-debian.yml
  when: pdns_installation_type == "packages" and ansible_os_family == "Debian"
  tags:
    - packages
    - install

- include: install.packages-redhat.yml
  when: pdns_installation_type == "packages" and ansible_os_family == "RedHat"
  tags:
    - packages
    - install

# TODO
#- include: install.source-debian.yml
#  when: pdns_installation_type == "source" and ansible_os_family == "Debian"
#  tags:
#    - source
#    - install
#
# TODO
#- include: install.source-redhat.yml
#  when: pdns_installation_type == "source" and ansible_os_family == "RedHat"
#  tags:
#    - source
#    - install

- include: database.yml
  tags:
    - db
    - database

- include: configuration.yml
  tags:
    - conf
    - config
    - configuration

- name: Start and enable the PowerDNS service
  service: name=pdns state=started enabled=true

---
- name: Load Distribution specific variables
  include_vars: '{{item}}'
  with_first_found:
    - files:
      - '{{ansible_os_family}}.yml'
      - 'default.yml'
      paths:
        - ../vars

- include: install.packages-debian.yml
  when: pdns_installation_type == "packages" and ansible_os_family == "Debian"
  tags:
    - packages
    - install

- include: install.packages-redhat.yml
  when: pdns_installation_type == "packages" and ansible_os_family == "RedHat"
  tags:
    - packages
    - install

# TODO
#- include: install.source-debian.yml
#  when: pdns_installation_type == "source" and ansible_os_family == "Debian"
#  tags:
#    - source
#    - install
#
# TODO
#- include: install.source-redhat.yml
#  when: pdns_installation_type == "source" and ansible_os_family == "RedHat"
#  tags:
#    - source
#    - install

- include: database.yml
  tags:
    - db
    - database

- include: configuration.yml
  tags:
    - conf
    - config
    - configuration

- name: Start and enable the PowerDNS service
  service: name=pdns state=started enabled=true

Add Distribution specific variable file loading
Add Distribution specific variable file loading

Load variable files based on precedence, allows easy override of defaults by more specific var files