Variables


ASYD offers a set of global variables, related to the host information, and offers the possibility of creating your own custom variables (see Adding hosts and Hostgroups on the documentation).

You can use any of those variables on any configuration file, deploy definition file, on the conditions for the conditionals and on the "monitor" files for monitoring services. These variables will get automatically replaced with their value (unless stated with the "noparse" parameter/tag). All the variables are case-insensitive, which means <%IP%> and <%ip%> will return the same value.


Global variables:

<%ASYD%> - ASYD server IP

<%HOSTNAME%> - Target host name

<%IP%> - Target host IP

<%SSH_PORT%> - Target host SSH port

<%DIST%> - Target host Linux distribution

<%DIST_VER%> - Target host distribution version

<%ARCH%> - Target host architecture

<%PKG_MANAGER%> - Target host package manager

<%SVC_MANAGER%> - Target host services manager

<%MONITOR:service%> - Not really a variable, monitors the service 'service'


Custom variables:

You can define custom variables on both hosts and hostgroups. You can also override the value of a variable defined on a hostgroup by defining the same variable on a host.

<%VAR:varname%> - Use the value assigned to "varname"

New on v1.1.0: Now you can optionally define default values on custom variables. If the variable is defined either on host or hostgroup, it will use it's value, else it will use the value specified on the "default" clause.

<%VAR:varname, default: value%>