includes.adoc 1.2 KB

1234567891011121314151617181920212223242526
  1. = Includes
  2. OliveTin 3k supports including configuration files from other files. This is useful for organizing large configurations or reusing common settings across multiple actions.
  3. == Include Syntax
  4. To include another configuration file, use the following syntax in your main configuration file:
  5. [source,yaml]
  6. ----
  7. include: config.d
  8. ----
  9. This will include all config files in the <config dir>/config.d/ directory.
  10. == Include Logic
  11. Files are included in alphabetical order based on their filenames. This allows you to control the order of inclusion by naming your files accordingly. For example;
  12. * `01-setup.yaml` contains `logLevel: debug`
  13. * `02-actions.yaml` contains `logLevel: info`
  14. * Final `logLevel` will be `info` since `02-actions.yaml` is included after `01-setup.yaml`.
  15. Everything under `actions` is merged into a single `actions` list after all files are included. This means you can define actions in multiple files and they will be combined into one list.
  16. WARNING: All other "lists" are overwritten by later files. For example, if you define `dashboards`, `entities`, `accessControlLists` or similar in multiple files, only the last definition will be used.