def task_install_zfs(distribution, variants=set()):
 commands = []
 if is_ubuntu(distribution):
  commands += [run_network_interacting_from_args(['add-apt-repository', '-y', 'ppa:zfs-native/stable'])]
  commands += [apt_get_update(), apt_get_install(['libc6-dev']), apt_get_install(['zfsutils'])]
 elif is_centos_or_rhel(distribution):
  commands += [yum_install([ZFS_REPO[distribution]])]
  if (distribution == 'centos-7'):
   commands.append(yum_install(['epel-release']))
  if (Variants.ZFS_TESTING in variants):
   commands += [yum_install(['yum-utils']), run_from_args(['yum-config-manager', '--enable', 'zfs-testing'])]
  commands.append(yum_install(['zfs']))
 else:
  raise DistributionNotSupported(distribution)
 return sequence(commands)

def task_install_zfs ( distribution , variants = set ( ) ) : commands = [ ] if is_ubuntu ( distribution ) : commands += [ run_network_interacting_from_args ( [ 'add-apt-repository' , '-y' , 'ppa:zfs-native/stable' ] ) ] commands += [ apt_get_update ( ) , apt_get_install ( [ 'libc6-dev' ] ) , apt_get_install ( [ 'zfsutils' ] ) ] elif is_centos_or_rhel ( distribution ) : commands += [ yum_install ( [ ZFS_REPO [ distribution ] ] ) ] if ( distribution == 'centos-7' ) : commands . append ( yum_install ( [ 'epel-release' ] ) ) if ( Variants . ZFS_TESTING in variants ) : commands += [ yum_install ( [ 'yum-utils' ] ) , run_from_args ( [ 'yum-config-manager' , '--enable' , 'zfs-testing' ] ) ] commands . append ( yum_install ( [ 'zfs' ] ) ) else : raise DistributionNotSupported ( distribution ) return sequence ( commands )
install zfs on a node .