Actions
Feature #2790
closedOptional setting for custom DNS TTL value in settings.yml
Description
When smart-proxy manipulates DNS zone records (A/PTR) by default it will use TTL value which is 86400. While it's pretty good for most cases, it might be not suitable for every possible case.
I've slightly modified lib/proxy/dns.rb code to optionally read custom TTL value from settings.yml file:
diff --git a/lib/proxy/dns.rb b/lib/proxy/dns.rb
index f580116..5d4d924 100644
--- a/lib/proxy/dns.rb
+++ b/lib/proxy/dns.rb
@@ -7,7 +7,7 @@ module Proxy::DNS
def initialize options = {}
@server = options[:server] || "localhost"
@fqdn = options[:fqdn]
- @ttl = options[:ttl] || "86400"
+ @ttl = options[:ttl] || SETTINGS.dns_ttl || "86400"
@type = options[:type] || "A"
@value = options[:value]
This would allow to set custom TTL value per smart-proxy instance.
Updated by Povilas Daukintis over 12 years ago
Added PR in Github: https://github.com/theforeman/smart-proxy/pull/102
Updated by Anonymous over 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 1242cab223cfaeec8c60fa0bc23ff1097f8b3c82.
Actions