def bulk_build(jail, pkg_file, keep=False):
 if (not os.path.isfile(pkg_file)):
  return 'Could not find file {0} on filesystem'.format(pkg_file)
 if (not is_jail(jail)):
  return 'Could not find jail {0}'.format(jail)
 if keep:
  cmd = 'poudriere bulk -k -f {0} -j {1}'.format(pkg_file, jail)
 else:
  cmd = 'poudriere bulk -f {0} -j {1}'.format(pkg_file, jail)
 res = __salt__['cmd.run'](cmd)
 lines = res.splitlines()
 for line in lines:
  if ('packages built' in line):
   return line
 return 'There may have been an issue building packages dumping output: {0}'.format(res)

def bulk_build ( jail , pkg_file , keep = False ) : if ( not os . path . isfile ( pkg_file ) ) : return 'Could not find file {0} on filesystem' . format ( pkg_file ) if ( not is_jail ( jail ) ) : return 'Could not find jail {0}' . format ( jail ) if keep : cmd = 'poudriere bulk -k -f {0} -j {1}' . format ( pkg_file , jail ) else : cmd = 'poudriere bulk -f {0} -j {1}' . format ( pkg_file , jail ) res = __salt__ [ 'cmd.run' ] ( cmd ) lines = res . splitlines ( ) for line in lines : if ( 'packages built' in line ) : return line return 'There may have been an issue building packages dumping output: {0}' . format ( res )
run bulk build on poudriere server .