Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates variables to use curl instead of dig #390

Merged
merged 1 commit into from
Oct 23, 2015
Merged

Updates variables to use curl instead of dig #390

merged 1 commit into from
Oct 23, 2015

Conversation

mxxcon
Copy link
Contributor

@mxxcon mxxcon commented Oct 21, 2015

The present dig command will not work on networks that restrict outgoing UDP traffic only to the network's own DNS servers.
This change uses curl to query OpenDNS's endpoint (with https to ensure response integrity).

@mxxcon mxxcon changed the title Updates fail2ban/defaults/main.yml Updates fail2ban/defaults/main.yml to use curl instead of dig Oct 21, 2015
@louim
Copy link
Contributor

louim commented Oct 21, 2015

Probably should be done there too?

saddr: ["{{ lookup('pipe', 'dig +short myip.opendns.com @resolver1.opendns.com') }}"]

@mxxcon mxxcon changed the title Updates fail2ban/defaults/main.yml to use curl instead of dig Updates variables to use curl instead of dig Oct 21, 2015
@mxxcon
Copy link
Contributor Author

mxxcon commented Oct 21, 2015

Thank you @louim. Missed that one.

@QWp6t
Copy link
Member

QWp6t commented Oct 21, 2015

This is good for Windows users who use Ansible with Babun/Cygwin. By default, Cygwin includes curl but not dig. So yay!

@swalkinshaw
Copy link
Member

@mxxcon thanks. Possible to get the commits squashed into 1 if you're familiar with the process?

/cc @fullyint as well

…P traffic only to the network's own DNS servers.

This change uses `curl` to query OpenDNS's endpoint (with https to ensure response integrity)
@mxxcon
Copy link
Contributor Author

mxxcon commented Oct 23, 2015

@swalkinshaw squashed as requested. 💃

swalkinshaw added a commit that referenced this pull request Oct 23, 2015
Use curl instead of dig for ip lookups
@swalkinshaw swalkinshaw merged commit 994e029 into roots:master Oct 23, 2015
@swalkinshaw
Copy link
Member

Thanks!

swalkinshaw added a commit that referenced this pull request Oct 23, 2015
@mxxcon mxxcon deleted the patch-1 branch October 23, 2015 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants