---
- name: Load variables
  include_vars: '{{item}}'
  with_first_found:
    - '{{ansible_os_family}}.yml}}'
    - 'default.yml'

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

- include: install.packages-redhat.yml
  when: pdns_rec_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: configuration.yml
  tags:
    - conf
    - config
    - configuration

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

---
- name: Load variables
  include_vars: '{{item}}'
  with_first_found:
    - '{{ansible_os_family}}.yml}}'
    - 'default.yml'

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

- include: install.packages-redhat.yml
  when: pdns_rec_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: configuration.yml
  tags:
    - conf
    - config
    - configuration

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

Add a tag to quickly start/enable the service
Add a tag to quickly start/enable the service
