mrlesmithjr / ansible-netplan

Ansible role to manage Netplan
MIT License
132 stars 85 forks source link

If interface name is set as {{ ansible_default_ipv4.interface }} it just writes the variable name instead of the value #39

Closed dimitrihof closed 9 months ago

dimitrihof commented 1 year ago

Describe the bug Hello i tried your role and have problem with getting the network device name as a variable

 netplan_renderer: networkd
 netplan_configuration:
   network:
     version: 2
     ethernets:
        "{{ ansible_default_ipv4.interface }}":

These are my first variables, but if i do it like that it doesnt fill in the variable with the network name, instead it just writes the string '{{ ansible_default_ipv4.interface }}' into the config. Is that a Problem with jinja2 templates?

Thanks for your Help! To Reproduce Use a variable for the default ethernet-if name instead of an actual name.

Expected behavior I expect it to write the default interface name into the config.

mrlesmithjr commented 1 year ago

@dmtrhfr - I'd recommend carrying this conversation over to #17 and let's see where this lands.

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.