The `org.osbuild.chrony` stage currently supports only a single option 'timeservers' which does not allow specifying additional options for the configured timeservers. The option can not be easily extended to allow specifying additional options and at the same time keep the backward compatibility with old manifests. The need for a lower-level stage option allowing to configure additional options of the 'server' directive is required by RHEL AMI images, which use 'maxpoll', 'minpoll' and 'prefered' options. Extend the `org.osbuild.chrony` stage with two additional options. The 'servers' option accepts a list of dictionaries specifying timeservers to be configured using the 'server' directive, including a subset of the directive options. The 'servers' option can not be used at the same time in the stage options as the 'timeservers' option. The second added option is 'leapsectz' corresponding with a directive of the same name. The value of the option is a string. If the provided string is empty, then all occurrences of the 'leapsectz' directive are removed from the `chrony.conf`. Otherwise, the 'leapsectz' directive is added to the `chrony.conf` with the provided value, while all original occurrences of the option are removed. Add a new stage test case under `test/data/stages/chrony-servers` to test the new variant of the stage options. The reason is that the 'timeservers' option conflicts with 'servers' option, which makes it impossible to test both of them in the same test case. Signed-off-by: Tomas Hozza <thozza@redhat.com> |
||
|---|---|---|
| .. | ||
| data | ||
| mod | ||
| pipelines | ||
| run | ||
| src | ||
| .gitignore | ||
| __init__.py | ||
| initrd.py | ||
| test.py | ||