blob: a4851a197ef66edb9597c9dc90eb1cefb93a93f0 [file] [log] [blame]
---
# nsd molecule/default/verify.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Verify
hosts: all
tasks:
# NOTE: Tests do not use the ansible dig lookup, because that executes on
# the host running ansible-playbook, not the target host.
# Lint flags the checks as they execute every time, skip this with 'noqa 301'
- name: Check for A record
command: # noqa 301
cmd: "dig gw.example.com @127.0.0.1"
register: a_dig
failed_when: "'gw.example.com.\t\t3600\tIN\tA\t192.168.1.1' not in a_dig.stdout"
- name: Check for NS record
command: # noqa 301
cmd: "dig ns example.com @127.0.0.1"
register: ns_dig
failed_when: "'example.com.\t\t3600\tIN\tNS\tgw.example.com.' not in ns_dig.stdout"
- name: Check for CNAME record
command: # noqa 301
cmd: "dig lpr.example.com @127.0.0.1"
register: cn_dig
failed_when: "'lpr.example.com.\t3600\tIN\tCNAME\tprinter.example.com.' not in cn_dig.stdout"