Skip to content

Instantly share code, notes, and snippets.

@David-5-1
Created May 30, 2023 13:08
Show Gist options
  • Save David-5-1/44306e3c4dde79b881586b295a313868 to your computer and use it in GitHub Desktop.
Save David-5-1/44306e3c4dde79b881586b295a313868 to your computer and use it in GitHub Desktop.
Examples of dig lookup (weird) usage
- hosts: all
gather_facts: no
tasks:
- name: A & AAAA
debug:
msg: "{{ lookup('community.general.dig', 'sinquin.eu./A', 'sinquin.eu./AAAA') }}"
- name: A on multiple hosts
debug:
msg: "{{ lookup('community.general.dig', 'sinquin.eu.', 'aquaray.com') }}"
- name: AAAA with option
debug:
msg: "{{ lookup('community.general.dig', 'sinquin.eu.', qtype='AAAA') }}"
- name: AAAA by arg
debug:
msg: "{{ lookup('community.general.dig', 'sinquin.eu.', 'qtype=AAAA') }}"
- name: MX by option
debug:
msg: "{{ lookup('community.general.dig', 'qtype=AAAA', 'sinquin.eu.', 'qtype=MX', qtype='A') }}"
- name: SOA forced
debug:
msg: "{{ lookup('community.general.dig', 'qtype=AAAA', 'sinquin.eu./SOA', 'qtype=MX', 'qtype=A') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment