Otter Documentation

Configuration Variables

Variables add flexibility when modeling infrastructure and creating Plans. Configuration Variables allow you to run the same plan differently on different servers.

You can define configuration variables at different scopes (Server, Server Role, Environment, or global), and then reference those variables in your plan, when using Operations, If/Else Blocks, Loop Blocks, etc. You can also create Runtime Variables in a plan itself.

Cascading Variables

Configuration Variables cascade, which means that you can define a variable of the same name in multiple places, and the correct value will be resolved at runtime. For example, if you define a variable named $HDarsPath on the Testing environment, when an orchestration or configuration plan runs against a server in the Testing environment, that variable will resolve at runtime.

If you also defined $HDarsPath on a single server in the Testing environment, than that value would be used instead.

This allows for reusing plans and templates without having to change local variables.

Resolution Rules

The variable definition that's the "closest" match to the current context is used. This is determined as follows.

  • Job
  • Server
  • Environment
  • Server Role
  • Global

Multiple Scopes

You can also assign multiple scopes to a configuration variable; for example, you could define a variable that's associated with both the Testing environment and the hdars-web role. A multi-scope variable simply adds precedence to the highest-scope (Job is still "closer" than a server or server role).

However, this get can become confusing as the resolution rules are simply not intuitive. We generally discourage this use. You can only create multi-scoped variables from the administration section, and they are visible (but not editable) on the servers, server roles, etc., they are associated with.