-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ansible: add getaddrinfo config to prefer IPv4
On some hosts, IPv6 connectivity is limited and may result in DNS lookups returning IPv6 addresses that the host is unable to reach. Add a config file for glibc's getaddrinfo function that configures IPv4 addresses to have higher precedence for such hosts.
- Loading branch information
1 parent
c5ad990
commit e93f339
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# getaddrinfo(3) configuration file | ||
# Settings to prefer IPv4 addresses for hosts with limited IPv6 connectivity. | ||
|
||
# Below settings are documented defaults but need to be duplicated since | ||
# setting any precedence line means the default table is not used. | ||
precedence ::1/128 50 | ||
precedence ::/0 40 | ||
precedence 2002::/16 30 | ||
precedence ::/96 20 | ||
|
||
# This line is changed from the default to give IPv4 higher precedence. | ||
precedence ::ffff:0:0/96 100 |
11 changes: 11 additions & 0 deletions
11
ansible/roles/bootstrap/tasks/partials/linuxonecc/rhel9.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
# LinuxONE Community Cloud Red Hat Enterprise Linux 9 | ||
|
||
- name: Configure getaddrinfo to prefer IPv4 addresses | ||
ansible.builtin.copy: | ||
dest: /etc/gai.conf | ||
group: root | ||
mode: 0644 | ||
owner: root | ||
src: "gai.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters