NAME

cmdb_shell_var_reader - Bulk run shell_var_reader for CMDB build purposes.

SYNOPSIS

cmdb_shell_var_reader [--verbose <0/1>] [B-d <dir>]

cmdb_shell_var_reader [--verbose <0/1>] [B-d <dir>] $group0 [$group1] ...

cmdb_shell_var_reader [--verbose <0/1>] [B-d <dir>] $group/$system0.sh [$group/$system1.sh] ...

DESCRIPTION

@ARGV cam be be specified to list specific groups or systems to regenerate the config files for.

FLAGS

--verbose <0/1>

A boolean value for if it should be verbose or not.

Default :: 1

-d <dir>

The directory to operate on. If undef, it will check the following directories for the file '.shell_var_reader'.

./
../
../../
../../../
../../../../

LAYOUT & WORKFLOW

Specifically named files.

- .shell_var_reader :: Marks the base directory as being for a shell_var_reader CMDB.

Specifically named directories.

- cmdb :: The CMDB directory.
- json_confs :: Generated JSON confs.
- shell_confs :: Generated shell confs.
- toml_confs :: Generated TOML confs.
- yaml_confs :: Generated YAML confs.

Other directories that that don't start with a '.' or contiain a file named '.not_a_system_group' will be processed as system groups.

TOML will be skipped if .no_toml exists in the base directory.

These directories will be searched for files directly below them for files ending in '.sh' and not starting with either a '_' or a '.'. The name used for a system is the name of the file minus the ending '.sh', so 'foo.bar.sh' would generate a config for a system named 'foo.bar'.

When it finds a file to use as a system config, it will point shell_var_reader at it with CMDB enabled and with the name of that system set the hostname to use with the CMDB. That name will also be saved as the variable 'SYSTEM_NAME', provided that variable is not defined already. If a 'munger.pl' exists, that file is used as the munger file. shell_var_reader will be ran four times, once to generate each config type.