Ansible template 192.168.100.120.yaml.j2 to copy in LXC container

Hello!

I have a very important question :slight_smile:
I have a container Jitsi and I am willing to create file in this container 50-cloud-init.yaml in path /etc/netplan/ with configuration text, but I need to use variables in file 192.168.100.120.yaml.j2 which is located in path /etc/ansible/roles/lxd_qs/templates/192.168.100.120.yaml.js

Is this possible use Ansible template module for this?

I used command:
- name: Copy new IP to container LXC shell: | lxc file push /etc/ansible/roles/lxd_qs/files/{{ lxc_IP_CT120 }}.yaml local:"{{ lxc_CT_NAME }}"/etc/netplan/"{{ file_of_network.stdout }}"
lxc exec "{{ lxc_CT_NAME }}" netplan apply

But copy module is copying file as is