Skip to content

Commit

Permalink
fix incorrect handling of ipv6 dns resolvers
Browse files Browse the repository at this point in the history
resolves #171
  • Loading branch information
FloRinke committed Jul 15, 2017
1 parent b50b7bf commit 36fe212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/main.yml
Expand Up @@ -90,7 +90,7 @@
when: (nginx_register_installed|d() and not nginx_register_installed.stat.exists and nginx__deploy_state in [ 'present' ])

- name: Get list of nameservers configured in /etc/resolv.conf
shell: "grep -E '^nameserver\\s' /etc/resolv.conf | awk '{print $2}'"
shell: "awk '/nameserver/ {if(/:/){sub(/[0-9a-fA-F:]+/, \"[&]\", $2)}; print $2}' /etc/resolv.conf"
register: nginx_register_nameservers
changed_when: False
when: (nginx__deploy_state in [ 'present' ])
Expand Down

0 comments on commit 36fe212

Please sign in to comment.