diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_v4.0/inventory/host_vars/tcam-profile.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_v4.0/inventory/host_vars/tcam-profile.yml index 943a8297a55..2b803474620 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen_v4.0/inventory/host_vars/tcam-profile.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen_v4.0/inventory/host_vars/tcam-profile.yml @@ -1,4 +1,5 @@ tcam_profile: system: traffic_policy profiles: - traffic_policy: "{{lookup('file', '{{ root_dir }}/inventory/TCAM_TRAFFIC_POLICY.conf')}}" + - name: traffic_policy + config: "{{lookup('file', '{{ root_dir }}/inventory/TCAM_TRAFFIC_POLICY.conf')}}" diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/README_v4.0.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/README_v4.0.md index bf1112a14c6..d5aa622b532 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/README_v4.0.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/README_v4.0.md @@ -786,7 +786,8 @@ hardware_counters: tcam_profile: system: < tcam profile name to activate > profiles: - < tcam_profile 01 >: "{{ lookup('file', '< path to TCAM profile using EOS syntax >') }}" + - name: < tcam_profile 01 > + config: "{{ lookup('file', '< path to TCAM profile using EOS syntax >') }}" ``` #### Platform diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/tcam-profile.j2 b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/tcam-profile.j2 index 10489c62f61..7e397eacbd0 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/tcam-profile.j2 +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/documentation/tcam-profile.j2 @@ -9,8 +9,8 @@ TCAM profile __`{{ tcam_profile.system | arista.avd.default('default') }}`__ is Following TCAM profiles are configured on device: -{% for profile in tcam_profile.profiles %} -- Profile Name: `{{ profile }}` +{% for profile in tcam_profile.profiles | arista.avd.convert_dicts('name','config') %} +- Profile Name: `{{ profile.name }}` {% endfor %} {% endif %} diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/tcam-profile.j2 b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/tcam-profile.j2 index 38df8066099..63cef1d9eae 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/tcam-profile.j2 +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/templates/eos/tcam-profile.j2 @@ -3,9 +3,9 @@ ! hardware tcam {% if tcam_profile.profiles is arista.avd.defined %} -{% for profile in tcam_profile.profiles | arista.avd.natural_sort %} - profile {{ profile }} -{{ tcam_profile.profiles[profile] }} +{% for profile in tcam_profile.profiles | arista.avd.convert_dicts('name','config') | arista.avd.natural_sort('name') %} + profile {{ profile.name }} +{{ profile.config }} ! {% endfor %} {% endif %}