20 lines
465 B
YAML
20 lines
465 B
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
gather_facts: false
|
|
any_errors_fatal: true
|
|
|
|
pre_tasks:
|
|
- name: "Install a package providing the `dig` tool"
|
|
ansible.builtin.apt:
|
|
name: dnsutils
|
|
state: present
|
|
|
|
tasks:
|
|
- name: "Test the output of the `dig` command"
|
|
changed_when: false
|
|
register: dig
|
|
failed_when: 'dig.stdout != "127.0.0.1"'
|
|
ansible.builtin.command:
|
|
cmd: "dig @127.0.0.1 -p 5353 hub.adm.vpn +short"
|