Fix missing configuration file usage, support -g

PreOS code did not use configuration support. This fix adds support
for using cdist configuration, which takes into account cdist
configuration file, environment variables and command line options,
especially conf_dir.

It also adds support for -g, --config-file option, for specifying
custom configuration file.
This commit is contained in:
Darko Poljak 2020-01-11 14:16:33 +01:00
commit 11f569959d
3 changed files with 18 additions and 14 deletions

View file

@ -59,7 +59,9 @@ SYNOPSIS
[-I INVENTORY_DIR] [-a] [-f HOSTFILE] [-H] [-t]
[host [host ...]]
cdist preos [-h] [-l LOGLEVEL] [-q] [-v] [-c CONF_DIR] [-L] [preos] ...
cdist preos [-h] [-l LOGLEVEL] [-q] [-v] [-c CONF_DIR] [-g CONFIG_FILE]
[-L]
[preos] ...
cdist preos [preos-options] debian [-h] [-l LOGLEVEL] [-q] [-v] [-b] [-a ARCH] [-B]
[-C] [-c CDIST_PARAMS] [-D DRIVE] [-e REMOTE_EXEC]
@ -464,6 +466,9 @@ Create PreOS.
**-c CONF_DIR, --conf-dir CONF_DIR**
Add configuration directory (one that contains "preos" subdirectory).
**-g CONFIG_FILE, --config-file CONFIG_FILE**
Use specified custom configuration file.
**-L, --list-preoses**
List available PreOS-es.