feat: configure edgecache for postgresql

- add fact to record system resolvers
- add resolvers feature in /etc/nginx/conf.d/resolvers.conf
- add rewrite rules for postgres/yum/repodata
This commit is contained in:
2024-05-19 16:19:23 +10:00
parent 2971018b7e
commit 6f9a606549
4 changed files with 53 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
# frozen_string_literal: true
Facter.add(:nameservers) do
confine kernel: 'Linux'
setcode do
nameservers = File.readlines('/etc/resolv.conf').grep(/^nameserver\s+(\S+)/) { Regexp.last_match(1) }
nameservers
end
end