Le 13 juillet 2018 17:44:04 GMT+02:00, Helmut Schneider <jumpe...@gmx.de> a écrit : > In my case there are commands with and without parameters: > > proto udp > dev tun > persist-tun > nobind >
What I usualy do in this case is to define the variable-without-param as a Boolean and use str2bool from stdlib to produce the correct value e.g. - in Puppet : $bind = False - in the erb : str2bool(@bind, 'bind', 'nobind') -- Johan Fleury PGP Key ID : 0x5D404386805E56E6 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/FFA893F4-B3E4-427A-A7DF-CD796463BA7C%40arcaik.net. For more options, visit https://groups.google.com/d/optout.