Hello,
I’m trying to use the win_chocolate module (on ansible 2.0.1.0) with the source parameter to deploy an application with a nupkg stored on a CIFS server.
Here’s my command: ansible windows -m win_chocolatey -a "name=myapp params=yes source=‘\myserver\software\chocolatey’ " -vvv
Below the logs on my ansible server:
FAILED! => {
“changed”: false,
“choco_error_cmd”: “choco.exe install -dv -y myapp -source \myserver\software\chocolatey”,
“choco_error_log”: “Chocolatey is running on Windows v 6.1.7601.65536 Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". Command line: "C:\ProgramData\chocolatey\choco.exe" install -dv -y myapp -source \myserver\software\chocolatey Received arguments: install -dv -y myapp -source \myserver\software\chocolatey NOTE: Hiding sensitive configuration data! Please double and triple check to be sure no sensitive data is shown, especially if copying output to a gist for review. Configuration: CommandName=‘install’| CacheLocation=‘C:\Users\ADMINI~1\AppData\Local\Temp’| ContainsLegacyPackageInstalls=‘True’| CommandExecutionTimeoutSeconds=‘2700’| Sources=‘\myserver\software\chocolatey’|Debug=‘True’|Verbose=‘True’| Force=‘False’|Noop=‘False’|HelpRequested=‘False’|RegularOutput=‘True’| QuietOutput=‘False’|PromptForConfirmation=‘False’|AcceptLicense=‘True’| AllowUnofficialBuild=‘False’|Input=‘myapp’|AllVersions=‘False’| SkipPackageInstallProvider=‘False’|PackageNames=‘myapp’| Prerelease=‘False’|ForceX86=‘False’|OverrideArguments=‘False’| NotSilent=‘False’|IgnoreDependencies=‘False’| AllowMultipleVersions=‘False’|AllowDowngrade=‘False’| ForceDependencies=‘False’|Information.PlatformType=‘Windows’| Information.PlatformVersion=‘6.1.7601.65536’| Information.PlatformName=‘Windows 7’| Information.ChocolateyVersion=‘0.9.9.11’| Information.ChocolateyProductVersion=‘0.9.9.11’| Information.FullName=‘choco, Version=0.9.9.11, Culture=neutral, PublicKeyToken=79d02ea9cad655eb’| Information.Is64Bit=‘True’|Information.IsInteractive=‘False’| Information.IsUserAdministrator=‘True’| Information.IsProcessElevated=‘True’|Features.AutoUninstaller=‘False’| Features.CheckSumFiles=‘True’|Features.FailOnAutoUninstaller=‘False’| ListCommand.LocalOnly=‘False’| ListCommand.IncludeRegistryPrograms=‘False’| UpgradeCommand.FailOnUnfound=‘False’| UpgradeCommand.FailOnNotInstalled=‘False’| UpgradeCommand.NotifyOnlyAvailableUpgrades=‘False’| NewCommand.AutomaticPackage=‘False’|SourceCommand.Command=‘unknown’| SourceCommand.Priority=‘0’|FeatureCommand.Command=‘unknown’| ConfigCommand.Command=‘unknown’|PushCommand.TimeoutInSeconds=‘0’| PinCommand.Command=‘unknown’| _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _ Installing the following packages: myapp By installing you accept licenses for the packages. myapp not installed. The package was not found with the source(s) listed. If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not. Version: "" Source(s): "\myserver\software\chocolatey" Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures: - myapp Exiting with 1”,
“failed”: true,
“invocation”: {
“module_name”: “win_chocolatey”
},
“msg”: “Error installing myapp”
}
It seems that I can not escape the \ before my CIFS server name.
If I look on my chocolatey logs on Windows the first backslash is always missing.
I tried ansible windows -m win_chocolatey -a "name=myapp params=yes source=‘\\myserver\software\chocolatey’ " -vvv with the same result there is always one backslash before my server.
Do you know how if there’s a solution to have this 2 backslashes before my server name or is the win_chocolate module not able to work with a CIFS server?
Best Regards