Incorporated documentation feedback

As per some of the discussion items I modified the proposal to have a
special top level includes key as well as added references to handling
of specific file includes.
This commit is contained in:
Zeyad Tamimi 2024-12-08 13:28:15 -08:00
parent 50cc2fdb77
commit 38731a6810
2 changed files with 15 additions and 12 deletions

View File

@ -34,7 +34,7 @@
extensions = ['sphinx.ext.todo',
'sphinx.ext.githubpages',
'sphinx.ext.extlinks',
"sphinx_multiversion",
#"sphinx_multiversion",
]
# suppress_warnings = ['image.nonlocal_uri']

View File

@ -48,23 +48,26 @@ Interval & duration fields in job definitions, pruning configurations, etc. must
.. _conf-include-directories:
Including Configuration Directories
-----------------------------------
Including Jobs Files and Directories
------------------------------------
It is possible to distribute zrepl job definitions over multiple YAML files. This is
achieved by using the `include` key in the configuration file.
achieved by using the `include_jobs` key in the main configuration file.
The directive is mutually exclusive with any other jobs definition and can only exist
in the configuration file:
in the main configuration file:
::
global: ...
jobs:
include: jobs.d
include_jobs:
- ./jobs.d/
- ./more_jobs.d/job.yml
.. NOTE::
The included directory path is treated as absolute when starting with `/` else it
The included path is treated as absolute when starting with `/` else it
is treated as a relative path from the directory of the loaded configuration file.
Included YAML job files must end with the `.yml` extension and can only contain
@ -76,11 +79,11 @@ Examples
::
> /etc/zrepl/zrepl.yml
include_jobs:
- ./jobs.d/
jobs:
include: jobs.d
> /etc/zrepl/zrepl.d/MyDataSet.yml
::
> /etc/zrepl/jobs.d/MyDataSet.yml
jobs:
- name: snapjob
type: snap