Features Enablement
Flex relies on Hashicorp Consul as its internal service discovery engine. Simply put, all services read from configuration changes in Consul to tune in their respective behavior and adapt accordingly.
One can picture it as an cross-instances distributed /etc directory for UNIX systems.
Consequently, Flex services rely on several settings from Consul registry, simply declared as basic key/value (KV) parameters.
The Dalet Flex collection comes bundled with various pre-configured KVs, as described in ansible/collections/ansible_collections/dalet/flex/vars/kvs.yml file.
One can modify Flex behavior and configuration settings by updating default values in place, or enabling some specific features by adding extra KVs.
As for services, it is fairly possible to customise Flex settings by filling the following variable:
dalet_flex_services_settings_custom: []
A given service setting is formatted as below:
- key: "yet/another/key/name" # Consul key, refer to Flex's documentation for list of available keys.
value: VALUE # Free type string value.
when: CONDITION # optional (defaults to true).
If using file lookup to load content for custom KV from the environment files/ directory, use the following notation:
- key: "key"
value: "{{ lookup('file', playbook_dir ~ '/../../../../../files/<file_name>') }}"
Any new set of key/value you would provide in dalet_flex_services_settings_custom would be merge with default settings and override anything in place.