Instead of creating an entry in /etc/systemd/network, you could create the tun device in the unit file (and destroy it after as well). This would keep the list of links less cluttered when it's not running.
To do this, you can delete the systemd-network netdev file and add a file at /etc/systemd/system/openvpn-client@{configname}.service.d/tuntap.conf containing:
[Service]ExecStartPre=+/usr/bin/ip tuntap del name tun-pia mode tunExecStartPre=+/usr/bin/ip tuntap add name tun-vpn mode tun user openvpn group openvpnExecStopPost=+/usr/bin/ip tuntap del name tun-vpn mode tun
Instead of creating an entry in /etc/systemd/network, you could create the tun device in the unit file (and destroy it after as well). This would keep the list of links less cluttered when it's not running.
To do this, you can delete the systemd-network netdev file and add a file at
/etc/systemd/system/openvpn-client@{configname}.service.d/tuntap.conf
containing:[Service]
ExecStartPre=+/usr/bin/ip tuntap del name tun-pia mode tun
ExecStartPre=+/usr/bin/ip tuntap add name tun-vpn mode tun user openvpn group openvpn
ExecStopPost=+/usr/bin/ip tuntap del name tun-vpn mode tun
Replacing tun-vpn and the user/group as needed.