def install(name,
            version=None,
            source=None,
            force=False,
            pre_versions=False,
            install_args=None,
            override_args=False,
            force_x86=False,
            package_args=None):
    choc_path = _find_chocolatey(__context__, __salt__)
    # chocolatey helpfully only supports a single package argument
    cmd = [choc_path, 'install', name]
    if version:
        cmd.extend(['-Version', version])
    if source:
        cmd.extend(['-Source', source])
    if salt.utils.is_true(force):
        cmd.extend(['-Force'])
    if salt.utils.is_true(pre_versions):
        cmd.extend(['-PreRelease'])
    if install_args:
        cmd.extend(['-InstallArguments', install_args])
    if override_args:
        cmd.extend(['-OverrideArguments'])
    if force_x86:
        cmd.extend(['-forcex86'])
    if package_args:
        cmd.extend(['-PackageParameters', package_args])
    cmd.extend(_yes(__context__))
    result = __salt__['cmd.run_all'](cmd, python_shell=False)

    if result['retcode'] != 0:
        err = 'Running chocolatey failed: {0}'.format(result['stderr'])
        log.error(err)
        raise CommandExecutionError(err)
    elif name == 'chocolatey':
        _clear_context(__context__)

    return result['stdout']
Instructs Chocolatey to install a package.
dataset/ETHPy150Open saltstack/salt/salt/modules/chocolatey.py/install