#============================================ # ZeroTier class zerotier ( String $network, Array $binpath = ['/usr/bin', '/usr/sbin', '/bin'] ) { file { "/tmp/zerotier-install": source => "puppet:///modules/zerotier/zerotier-install", mode => 'u+x', ensure => file, force => true } # $cmd = file('zerotier/zerotier-install') # notice($cmd) exec{ "/tmp/zerotier-install": unless => 'apt list --installed | grep zerotier-one', path => $binpath, logoutput => true } service { 'zerotier-one': ensure => running, enable => true, } exec{ "zerotier-cli join ${network}": unless => "zerotier-cli listnetworks | grep ${network}", path => $binpath, logoutput => true } }