Overview of config.json
The config.json file is generated during the execution of an action and is passed to Ansible when the playbook is launched using the --extra-vars parameter.
The file contains the action execution context and provides Ansible playbook access to service information about the current object and the action execution parameters.
|
IMPORTANT
The file is generated dynamically and is not intended for manual editing.
|
The file contains the following top-level sections:
{
"adcm": {
"config": {
"audit_data_retention": {
"config_rotation_in_db": 0,
"data_archiving": false,
"log_rotation_in_db": 365,
"log_rotation_on_fs": 365,
"retention_period": 1825
},
"auth_policy": {
"block_time": 5,
"login_attempt_limit": 5,
"max_password_length": 128,
"min_password_length": 12
},
"global": {
"accept_only_verified_bundles": false,
"adcm_url": null,
"verification_public_key": "/adcm/data/file/adcm.1.global.verification_public_key"
},
"ldap_integration": null,
"statistics_collection": {
"url": "adcm-usage-ss.arenadata.io"
}
},
"uuid": "694f1bfe-9702-4a9d-9219-bb74f8762a62"
},
"context": {
"cluster_id": 19,
"type": "cluster"
},
"env": {
"consul_client_cacert_file": null,
"consul_client_cert_file": null,
"consul_client_key_file": null,
"consul_datacenter": null,
"consul_url": null,
"log_dir": "/adcm/data/log",
"run_dir": "/adcm/data/run",
"stack_dir": "/adcm/data/bundle/62e235762f4410a6bf4f4dfff29591e3fd2c3b8c",
"status_api_token": "4cd86bdcdddfe2fa7a1c2fb1712ae39515a99dbc",
"tmp_dir": "/adcm/data/run/258/tmp"
},
"job": {
"action": "install_wizard",
"cluster_id": 19,
"command": "validate",
"hostgroup": "CLUSTER",
"id": 258,
"job_name": "validate",
"params": {
"rules": []
},
"playbook": "/adcm/data/bundle/62e235762f4410a6bf4f4dfff29591e3fd2c3b8c/wizard_jinja/playbook.yaml",
"script": "wizard_jinja/playbook.yaml",
"verbose": false
},
"process": {
"current": {
"stage": "manage_ssl_stage",
"step": "configure_ssl_test"
},
"stages": {
"apply_config": {},
"manage_kerberos": {},
"manage_ssl_stage": {
"configure_ssl": {
"config": {
"ssl_config": null
}
}
}
}
}
}
{
"adcm": {
"config": {
"audit_data_retention": {
"config_rotation_in_db": 0,
"data_archiving": false,
"log_rotation_in_db": 365,
"log_rotation_on_fs": 365,
"retention_period": 1825
},
"auth_policy": {
"block_time": 5,
"login_attempt_limit": 5,
"max_password_length": 128,
"min_password_length": 12
},
"global": {
"accept_only_verified_bundles": false,
"adcm_url": "http://10.92.40.241:8000/",
"verification_public_key": "/adcm/data/file/adcm.1.global.verification_public_key"
},
"ldap_integration": null,
"statistics_collection": null
},
"uuid": "8e5aae80-a466-41ba-a6ad-66b67ed76457"
},
"context": {
"cluster_id": 77,
"service_id": 653,
"type": "service"
},
"env": {
"consul_cacert_file": null,
"consul_datacenter": null,
"consul_url": null,
"log_dir": "/adcm/data/log",
"run_dir": "/adcm/data/run",
"stack_dir": "/adcm/data/bundle/16eb76f32144efa9a95500028bdbb1cbd5c4717e",
"status_api_token": "9dbc1a22e761c6a6646ea5111c12e259b071ccbc",
"tmp_dir": "/adcm/data/run/8165/tmp"
},
"job": {
"action": "check",
"cluster_id": 77,
"command": "check",
"hostgroup": "airflow2",
"id": 8165,
"job_name": "check",
"params": {
"actions": [
"check"
],
"rules": []
},
"playbook": "/adcm/data/bundle/16eb76f32144efa9a95500028bdbb1cbd5c4717e/ansible/playbook.yaml",
"script": "ansible/playbook.yaml",
"service_id": 653,
"service_type_id": 2119,
"verbose": false
},
"process": null
}
{
"adcm": {
"config": {
"audit_data_retention": {
"config_rotation_in_db": 0,
"data_archiving": false,
"log_rotation_in_db": 365,
"log_rotation_on_fs": 365,
"retention_period": 1825
},
"auth_policy": {
"block_time": 5,
"login_attempt_limit": 5,
"max_password_length": 128,
"min_password_length": 12
},
"global": {
"accept_only_verified_bundles": false,
"adcm_url": null,
"verification_public_key": "/adcm/data/file/adcm.1.global.verification_public_key"
},
"ldap_integration": null,
"statistics_collection": {
"url": "adcm-usage-ss.arenadata.io"
}
},
"uuid": "cdb4d7ac-80b9-4e14-b6fc-e14366bd2048"
},
"context": {
"host_id": 2,
"provider_id": 1,
"type": "host"
},
"env": {
"consul_cacert_file": null,
"consul_datacenter": null,
"consul_url": null,
"log_dir": "/adcm/data/log",
"run_dir": "/adcm/data/run",
"stack_dir": "/adcm/data/bundle/34655eaf0e9efc86ff902eaaad22bfae58786a59",
"status_api_token": "f6f9073eedec9770627df26e377ba1d409353488",
"tmp_dir": "/adcm/data/run/384/tmp"
},
"job": {
"action": "rng_install",
"cluster_id": 12,
"command": "rng_install",
"host_id": 2,
"host_type_id": 3,
"hostgroup": "HOST",
"hostname": "ke-consul",
"id": 384,
"job_name": "rng_install",
"params": {
"ansible_tags": "rng_install",
"rules": []
},
"playbook": "/adcm/data/bundle/34655eaf0e9efc86ff902eaaad22bfae58786a59/ansible/common_data/playbooks/rng_install.yaml",
"provider_id": 1,
"script": "ansible/common_data/playbooks/rng_install.yaml",
"verbose": false
},
"process": null
}
adcm
The adcm section contains system information about the current ADCM instance.
This section is used to obtain service data (for example, the ADCM URL, ADCM UUID, and other settings). The structure can vary depending on the ADCM version.
context
The context section contains information about an object for which the job is executed. It can be:
This section is used to determine the Ansible playbook execution context.
env
The env section contains the allowed environment variables with which ADCM was started.
It can include:
-
user-defined environment variables;
-
default environment variables.
job
The job section contains information about the executed job.
It can include:
-
job identifier;
-
action name;
-
action type;
-
hostgroup— name of the inventory group, formed in accordance with the rules for forming inventory groups:-
if the action is defined at the cluster level — the group is named
CLUSTER; -
if the action is defined at the service level — the group name matches the service name;
-
if the action is defined at the component level — the group name has the
<service name>.<component name>format; -
if the action is defined at the hostprovider level — the group is named
PROVIDER; -
if the action is defined at the action level — the group is named
HOST;
-
-
additional parameters.
process
|
NOTE
The process section is present in config.json only when when executing an action implemented as Wizard and defined in the prototype.
|
The section reflects the execution state of an action implemented as Wizard and contains the following information:
-
the current stage and step;
-
configuration data entered by the user;
-
host-component mapping — a cumulative distribution formed at the current stage of the flow;
-
flow intermediate data.
process.current
Defines the current stage and step being executed within the job and contains the following parameters:
-
stage— the stage name; -
step— the step name.
process.stages
Contains data for all stages of the action execution flow.
Each stage can include:
-
step description;
-
configuration parameters;
-
distribution of components among hosts created during this step;
-
nested configuration structures.