@@ -27,9 +27,9 @@ | |||||
{"name": "restore_key", "value": "[[restoreKey]]"}, | {"name": "restore_key", "value": "[[restoreKey]]"}, | ||||
{"name": "restore_timeout", "value": "[[restoreTimeoutSeconds]]"}, | {"name": "restore_timeout", "value": "[[restoreTimeoutSeconds]]"}, | ||||
{"name": "test_mode", "value": "[[testMode]]"}, | {"name": "test_mode", "value": "[[testMode]]"}, | ||||
{"name": "errbit_url", "value": "[[#compare fork '==' true]][[configuration.errorApi.url]][[/compare]]"}, | |||||
{"name": "errbit_key", "value": "[[#compare fork '==' true]][[configuration.errorApi.key]][[/compare]]"}, | |||||
{"name": "errbit_env", "value": "[[#compare fork '==' true]][[node.fqdn]][[/compare]]"} | |||||
{"name": "errbit_url", "value": "[[errbit_url]]"}, | |||||
{"name": "errbit_key", "value": "[[errbit_key]]"}, | |||||
{"name": "errbit_env", "value": "[[errbit_env]]"} | |||||
], | ], | ||||
"optionalConfigNames": ["restore_key", "restore_timeout", "errbit_url", "errbit_key", "errbit_env"], | "optionalConfigNames": ["restore_key", "restore_timeout", "errbit_url", "errbit_key", "errbit_env"], | ||||
"tgzB64": "" | "tgzB64": "" |
@@ -21,6 +21,7 @@ import org.cobbzilla.util.handlebars.HandlebarsUtil; | |||||
import org.cobbzilla.util.io.Tarball; | import org.cobbzilla.util.io.Tarball; | ||||
import org.cobbzilla.util.io.TempDir; | import org.cobbzilla.util.io.TempDir; | ||||
import org.cobbzilla.util.string.Base64; | import org.cobbzilla.util.string.Base64; | ||||
import org.cobbzilla.wizard.server.config.ErrorApiConfiguration; | |||||
import org.cobbzilla.wizard.validation.ValidationResult; | import org.cobbzilla.wizard.validation.ValidationResult; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
@@ -80,9 +81,10 @@ public class AnsiblePrepService { | |||||
ctx.put("sslPort", network.getSslPort()); | ctx.put("sslPort", network.getSslPort()); | ||||
ctx.put("publicBaseUri", network.getPublicUri()); | ctx.put("publicBaseUri", network.getPublicUri()); | ||||
if (network.sendMetrics()) { | |||||
ctx.put("errbit_url", configuration.getErrorApi().getUrl()); | |||||
ctx.put("errbit_key", configuration.getErrorApi().getKey()); | |||||
if (network.sendMetrics() && configuration.hasErrorApi()) { | |||||
final ErrorApiConfiguration errorApi = configuration.getErrorApi(); | |||||
ctx.put("errbit_url", errorApi.getUrl()); | |||||
ctx.put("errbit_key", errorApi.getKey()); | |||||
ctx.put("errbit_env", node.getFqdn()); | ctx.put("errbit_env", node.getFqdn()); | ||||
} | } | ||||
@@ -48,9 +48,9 @@ | |||||
{"name": "restore_key", "value": "[[restoreKey]]"}, | {"name": "restore_key", "value": "[[restoreKey]]"}, | ||||
{"name": "restore_timeout", "value": "[[restoreTimeoutSeconds]]"}, | {"name": "restore_timeout", "value": "[[restoreTimeoutSeconds]]"}, | ||||
{"name": "test_mode", "value": "[[testMode]]"}, | {"name": "test_mode", "value": "[[testMode]]"}, | ||||
{"name": "errbit_url", "value": "[[#compare fork '==' true]][[configuration.errorApi.url]][[/compare]]"}, | |||||
{"name": "errbit_key", "value": "[[#compare fork '==' true]][[configuration.errorApi.key]][[/compare]]"}, | |||||
{"name": "errbit_env", "value": "[[#compare fork '==' true]][[node.fqdn]][[/compare]]"} | |||||
{"name": "errbit_url", "value": "[[errbit_url]]"}, | |||||
{"name": "errbit_key", "value": "[[errbit_key]]"}, | |||||
{"name": "errbit_env", "value": "[[errbit_env]]"} | |||||
], | ], | ||||
"optionalConfigNames": ["restore_key", "restore_timeout", "errbit_url", "errbit_key", "errbit_env"], | "optionalConfigNames": ["restore_key", "restore_timeout", "errbit_url", "errbit_key", "errbit_env"], | ||||
"tgzB64": "" | "tgzB64": "" | ||||