diff options
author | varac <varacanero@zeromail.org> | 2014-12-10 15:57:11 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-12-10 15:57:11 +0100 |
commit | f239077acfa25b3958d8cc17f39e2af934bd4f11 (patch) | |
tree | 8b087e2c5722d7b4a72e7e92a3788e9c7a025c23 | |
parent | 4c80f0891af507d84b5a1710cadb7e37378e93b2 (diff) | |
parent | 7871852a39bf59947b25184e6c6df365ba3b5052 (diff) |
Merge branch '6477_fix_internal_domain_names' into develop
-rw-r--r-- | provider_base/provider.json | 2 | ||||
-rw-r--r-- | provider_base/services/monitor.json | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/provider_base/provider.json b/provider_base/provider.json index 9ef0f76a..77437935 100644 --- a/provider_base/provider.json +++ b/provider_base/provider.json @@ -1,6 +1,6 @@ { "domain": "REQUIRED", - "domain_internal": "= domain.sub(/\\..*$/,'.i')", + "domain_internal": "= domain.sub(/\\.[^\\.]*$/, '.i')", "name": { "en": "REQUIRED" }, diff --git a/provider_base/services/monitor.json b/provider_base/services/monitor.json index ff3a27a3..10d5ac81 100644 --- a/provider_base/services/monitor.json +++ b/provider_base/services/monitor.json @@ -1,9 +1,9 @@ { "nagios": { "nagiosadmin_pw": "= secret :nagios_admin_password", - "domains_internal": "= global.tags.field('domain.internal_suffix').compact.uniq", + "domains_internal": "= nagios.hosts.values.map{|h|h['domain_internal_suffix']}.uniq", "environments": "= Hash[ nagios.hosts.values.map{|h|h['environment']}.uniq.map{|e| [e||'default',{'contact_emails'=>global.env(e).provider.contacts.default}]} ]", - "hosts": "= (self.environment == 'local' ? nodes_like_me : nodes[:environment => '!local']).pick_fields('environment', 'domain.internal', 'domain.full_suffix', 'ip_address', 'services', 'openvpn.gateway_address', 'ssh.port')" + "hosts": "= (self.environment == 'local' ? nodes_like_me : nodes[:environment => '!local']).pick_fields('environment', 'domain.internal', 'domain.internal_suffix', 'domain.full_suffix', 'ip_address', 'services', 'openvpn.gateway_address', 'ssh.port')" }, "hosts": "= self.environment == 'local' ? hosts_file(nodes_like_me) : hosts_file(nodes[:environment => '!local'])", "ssh": { |