- name: ns installation include_tasks: install.yml when: function == 'install' - block: - name: add records include_tasks: add_records.yml when: services.internal_ns is defined - debug: msg: internal nameserver is not defined when: services.internal_ns is not defined when: function == 'add_records'