Environment Variables
Ansibleforms is a nodejs webapplication and is tunable using environment variables.
Whether you use docker-compose, kubernetes or you run the webapplication natively, we advise you to get familiar with these variables and learn how to set them in your preferred environment.
Variable | Choices/Defaults | Comments |
---|---|---|
NODE_ENV string |
Default:
production |
The nodejs environment Nodejs can have multiple environments, like development or production |
DB_HOST string / required |
The database host
Ansible Forms requires a mysql database connection to store the configuration of the application. |
|
DB_USER string / required |
The database user Ansible Forms requires a mysql database connection to store the configuration of the application. |
|
DB_PASSWORD string / required |
The database password
Ansible Forms requires a mysql database connection to store the configuration of the application. |
|
PORT number |
Default:
8000 |
Http port The listening port of the web application |
HTTPS number |
Choices:
|
Enables HTTPS Our docker-compose comes with sample certificates. It is highly recommended to enable HTTPS. |
HTTPS_KEY string |
Default:
%PERSISTENT_FOLDER%/certificates/key.pem |
Private key The path to the private key of the server certificate, in BASE64/PEM format. |
HTTPS_CERT string |
Default:
%PERSISTENT_FOLDER%/certificates/cert.pem |
Certificate The path to the server certificate, in BASE64/PEM format. |
FORMS_PATH string |
Default:
%PERSISTENT_FOLDER%/forms.yaml |
Forms.yaml path
The forms.yaml file is the main configuration file needed to run Ansible Forms. |
LOCK_PATH string |
Default:
%PERSISTENT_FOLDER%/ansibleForms.lock |
ansibleForm.lock path Only 1 user can use the designer, so we use a locking file to hold the current owners information. |
FORMS_BACKUP_PATH string added in version 4.0.3 |
Default:
%PERSISTENT_FOLDER%/form_backups |
Backup path for form backups
When backups are made, they end up in this path |
OLD_BACKUP_DAYS number added in version 4.0.3 |
Default:
60 |
Days of backups to keep Old backups are cleanup, you can choose the age |
AZURE_GRAPH_URI string added in version 4.0.3 |
Default:
https://graph.microsoft.com |
The azure graph api base uri
This variable is used to acquire data from the Azure AD api. |
ALLOW_SCHEMA_CREATION number added in version 5.0.3 |
Choices:
|
Enable the schema creation
When you start Ansible Forms for the first time and there is no database, Ansible Forms will present you the option to create the schema.
Although this is fairly handy, you might want to disable this option to prevent accidental schema re-creation. |
ENABLE_BYPASS number added in version 5.0.3 |
Choices:
|
Enable the bypass admin authentication
When you have locked yourself out, you can enable the bypass admin authentication, by setting this variable to 1. |
ENABLE_DB_QUERY_LOGGING number added in version 5.0.3 |
Choices:
|
Enable the database query logging
When you want to see the database queries that are executed, you can enable this option by setting this variable to 1. |
ENABLE_FORMS_YAML_IN_DATABASE number added in version 5.0.3 |
Choices:
|
Enable the forms.yaml in database
If you use git repositories to store the forms, you can choose to store the master forms.yaml in git as well. |
SHOW_DESIGNER number added in version 4.0.0 |
Choices:
|
Enable the internal designer
Although we encourage you to use an editor such as Visual Studio Code to edit the forms.yaml file, preferably with some form of source control. Ansible Forms comes with an internal yaml designer. |
USE_YTT number added in version 5.0.2 |
Choices:
|
Enable the ytt interpreter https://github.com/carvel-dev/ytt is a tool for yaml templating. It can be activated by this variable. |
LOG_LEVEL string |
Choices:
|
Log level
Ansible Forms logs to logfile called Ansible Forms.log. |
LOG_PATH string |
Default:
%PERSISTENT_FOLDER%/logs |
Path for logfiles
Ansible Forms maintains 2 logfiles. Make the logfiles rotating with daily timestamp. 30days of logs are kept. |
LOG_CONSOLE_LEVEL string |
Choices:
|
Console Log level
When you run ansibleforms, by default the application also logs to the console. |
LOG_SYSLOG_HOST string added in version 3.0.1 |
Syslog host Setting the syslog settings, enables the logging to a syslog server |
|
LOG_SYSLOG_LEVEL string added in version 3.0.1 |
Choices:
|
Syslog level The logging level for the syslog server |
LOG_SYSLOG_PORT number added in version 3.0.1 |
Default:
514 |
Syslog Port The port on which the syslog server is listening |
LOG_SYSLOG_PROTOCOL string added in version 3.0.1 |
Choices:
|
Syslog protocol The syslog protocol to use |
LOG_SYSLOG_PATH string added in version 3.0.1 |
Default:
/dev/log |
Syslog path
The path to the syslog dgram socket (i.e. |
LOG_SYSLOG_SOURCE string added in version 3.0.1 |
Default:
localhost |
Source hostname Host to indicate where log messages are coming from |
LOG_SYSLOG_TYPE string added in version 3.0.1 |
Choices:
|
Syslog protocol type The type of the syslog protocol to use |
LOG_SYSLOG_APPNAME string added in version 3.0.1 |
Default:
Ansible Forms |
App Name The name of the application |
LOG_COLOR_ERROR string added in version 3.0.1 |
Default:
\x1b[31m |
Error color code The escape color code for error (default red) |
LOG_COLOR_WARN string added in version 3.0.1 |
Default:
\x1b[33m |
Warning color code The escape color code for warning (default yellow) |
LOG_COLOR_NOTICE string added in version 3.0.1 |
Default:
\x1b[37m |
Notice color code The escape color code for notice (default white) |
LOG_COLOR_INFO string added in version 3.0.1 |
Default:
\x1b[32m |
Info color code The escape color code for info (default green) |
LOG_COLOR_DEBUG string added in version 3.0.1 |
Default:
\x1b[36m |
Debug color code The escape color code for debug (default cyan) |
ACCESS_TOKEN_SECRET string |
Default:
*** NOT REVEALED *** |
Secret to encryp access tokens
AnsibleForm uses Basic Authentication as authentication mechanism. |
ACCESS_TOKEN_EXPIRATION string |
Default:
30m |
Expiration time access token
A JWT (Json Web Token) is only valid for a certain amount of time. |
ACCESS_TOKEN_REFRESH_EXPIRATION string |
Default:
24h |
Expiration time refresh token
Once the access token is expired, and the client tries to connect to the server, the client hits a 401 error (unauthorized). the client application captures this error, and calls the refresh api with its refresh token. If the refresh token is valid, the client gets a new set of access and refresh tokens and retries the last unauthorized api call with the renew access token. |
HOME_PATH string added in version 3.0.0 |
Default:
OS Homedir path |
The users home directory
Ansible Forms generates an sshkey at first start, is one is not present, so you can have a git connection or other password-less connection. |
REPO_PATH string added in version 3.0.0 |
Default:
%PERSISTENT_FOLDER%/repositories |
Repositories path This path is the root path for your local repositories, allowing you to integrate data with git repositories. |
ENCRYPTION_SECRET string |
Default:
*** NOT REVEALED *** |
Database encryption secret
Ansible Forms encrypts passwords in the database using this secret. |
ANSIBLE_PATH string |
Default:
%PERSISTENT_FOLDER%/playbooks |
The path of the ansible playbooks (local instance) Ansible Forms can have a local ansible instance. This path says where the playbooks are. |
REGEX_FILTER_JOB_OUTPUT string |
Default:
\[low\] |
Filter out job output tasks
Sometime, the job output is flooded with meaningless output, such as ‘Gathering Facts’, or ‘Includes’. You filter out these by add a piece of string in the taskname, i.e. |
UPLOAD_PATH string added in version 4.0.16 |
Default:
%PERSISTENT_FOLDER%/uploads |
The path for file uploads Since 4.0.16, a new field type is introduced that allows file uploads. The files are uploaded in this path. |