-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Banner per device appended to standard banner #4940
Comments
I think this is a good use case for inline jinja. Something like:
|
I tried that, but the jinja is not being processed, it is taken over literally. |
Your snip contains !unsafe, which will prevent ansible from templating that. |
forgot to remove that from the FR, but even without, the jinja is just passed to the device config without being parsed (See the banner motd) |
Something in your vars is missing. Inline jinja in Ansible returns the original template if any variable is missing. You can use our default filter to handle that. Example with and without the default filter proving the point: _common_banner: |
Foo
_device_banner: |
Bar
custom_structured_configuration_banners:
login: "{{ _missing_banner | arista.avd.default('') }}{{ _device_banner | arista.avd.default('') }}{{ _common_banner | arista.avd.default('') }}"
motd: "{{ _missing_banner }}{{ _device_banner }}{{ _common_banner }}" |
Enhancement summary
I would like to be able to add extra lines to the 'fabric defined banner' for some devices.
The default motd/login banners are defined in the fabric.yml
It would be great if there was a config variable that can be used to pre or append banner text per device/group
Which component of AVD is impacted
eos_cli_config_gen
Use case example
For each device I want to add extra information to the motd banner (racklocation, customer purpose, ...) without having to repeat the fabric wide general banner.
Describe the solution you would like
new variables available as structured_config under node_type_default/node_groups/nodes.
the
banner_prepend
is added before the 'banner', the 'banner_append' is inserted just before the EOF lineDescribe alternatives you have considered
I tried to accomplish this with variable, but the Jinja is not parsed and put litterly in the config:
becomes
Additional context
No response
Contributing Guide
The text was updated successfully, but these errors were encountered: