gc_integration_templater/inventory.yml

60 lines
1.9 KiB
YAML

# the inventory file dictates the content of the config_context dictionary item used to render jinja2 templates
# this could be generated by a csv, populated in a database or simply exist as a flat file
# content of inventory.yml
#
# router1_customer1: # include variables from config_contexts/device/router1_customer1.yml
# platform: eos # include template from templates/eos.j2
# config_contexts: # create folders by the name of the key and files by the name of the key value(s),
# site: dub # include variables from config_contexts/site/dub.yml
# region: europe
# role: # include variables from config_contexts/role/router.yml and config_contexts/role/vpn.yml, list may contain any number of items
# - router
# - vpn
# content of config_contexts/device/router1_customer1.yml
# there are no special/functional items
# the device context has weight 0, top precedence
# keys in this file will overwrite any duplicate keys imported from any other context.
#
# key_name: "some_value"
# content of files under the context_contexts folder, example config_contexts/site/dub.yml
# the _metadata object, keys 'weight'(int) and is_active(bool) are functional, they control the order of precedence in which the keys are merged to the config_context
#
# _metadata:
# name: "dublin"
# weight: 300
# description: "Site Dublin Definitions"
# is_active: true
# site: dublin
# cbeebies_schedule: "18/11/2023"
device_a:
platform: ios
config_contexts:
region: europe
site: lon
role:
- router
- switch
- vpn
- firewall
device_b:
platform: eos
config_contexts:
site: dub
region: europe
role:
- router
- vpn
# device_c:
# config_contexts:
# region: asia
# platform: ios
# device_d:
# config_contexts:
# region: south_america