nautobot-app-golden-config icon indicating copy to clipboard operation
nautobot-app-golden-config copied to clipboard

Secrets rendering in post-processing errors out in GC 1.6.4

Open gioccher opened this issue 5 months ago • 0 comments

Environment

  • Python version: 3.9.
  • Nautobot version: 1.6.10
  • nautobot-golden-config version: 1.6.4

Expected Behavior

secrets are rendered in the postprocessed config

Observed Behavior

error "Jinja encountered an TemplateAssertionError: 'No filter named 'get_secret_by_secret_group_name'.'; check the template for correctness"

Steps to Reproduce

seems to affect only nautobot 1.X

  1. use the template:
device name: {{ hostname }}
snmp-server community {% raw %}{{ hostname | get_secret_by_secret_group_name("key") | default('no password') }}{% endraw %}
  1. run the "Generate Intended Configurations" job
  2. go to the device page and click on the "Configuration Postprocessing" icon, or call the /plugins/golden-config/config-postprocessing/ API

image

gioccher avatar Feb 02 '24 00:02 gioccher