Usage

Just pass it the path to a directory tree of templates:

sudo os-apply-config -t /home/me/my_templates

By default it will read config files according to the contents of the
file /var/run/os-collect-config/os_config_files.json. This path can
be changed with the command line switch –os-config-files, or the
environment variable OS_CONFIG_FILES_PATH. The list can also be
overridden with the environment variable OS_CONFIG_FILES. If
overriding with OS_CONFIG_FILES, the paths are expected to be colon,
“:”, separated. Each json file referred to must have a mapping as
their root structure. Keys in files mentioned later in the list will
override keys in earlier files from this list. For example:

OS_CONFIG_FILES=/tmp/ec2.json:/tmp/cfn.json os-apply-config

This will read ec2.json and cfn.json, and if they have any
overlapping keys, the value from cfn.json will be used. That will
populate the tree for any templates found in the template path. See
https://git.openstack.org/cgit/openstack/os-collect-config for a
program that will automatically collect data and populate this list.

You can also override OS_CONFIG_FILES with the –metadata command
line option, specifying it multiple times instead of colon separating
the list.

os-apply-config will also always try to read metadata in the old
legacy paths first to populate the tree. These paths can be changed
with –fallback-metadata.

Templates

The template directory structure should mimic a root filesystem, and
contain templates for only those files you want configured. For
example: