For all these statements it could be smarter to use something like:
listen_ipv6= <%=  scope.lookupvar('vsftpd::listen_ipv6') ||= 'NO'%>
(to verify).