blob: 43cba44ec78885e860af9f21d33df5c4029f0c3b [file] [log] [blame]
Zack Williams13644cc2020-08-30 15:16:43 -07001---
2# nsd molecule/default/verify.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: Verify
8 hosts: all
9 tasks:
10
11 # NOTE: Tests do not use the ansible dig lookup, because that executes on
12 # the host running ansible-playbook, not the target host.
13
14 # Lint flags the checks as they execute every time, skip this with 'noqa 301'
15
16 - name: Check for A record
17 command: # noqa 301
18 cmd: "dig gw.example.com @127.0.0.1"
19 register: a_dig
Zack Williamsda1625e2020-11-25 12:11:19 -070020 failed_when: "'gw.example.com.\t\t3600\tIN\tA\t10.0.0.1' not in a_dig.stdout"
Zack Williams13644cc2020-08-30 15:16:43 -070021
22 - name: Check for NS record
23 command: # noqa 301
24 cmd: "dig ns example.com @127.0.0.1"
25 register: ns_dig
26 failed_when: "'example.com.\t\t3600\tIN\tNS\tgw.example.com.' not in ns_dig.stdout"
27
28 - name: Check for CNAME record
29 command: # noqa 301
30 cmd: "dig lpr.example.com @127.0.0.1"
31 register: cn_dig
32 failed_when: "'lpr.example.com.\t3600\tIN\tCNAME\tprinter.example.com.' not in cn_dig.stdout"