Zack Williams | 13644cc | 2020-08-30 15:16:43 -0700 | [diff] [blame^] | 1 | --- |
| 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 |
| 20 | failed_when: "'gw.example.com.\t\t3600\tIN\tA\t192.168.1.1' not in a_dig.stdout" |
| 21 | |
| 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" |