Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win_chocolatey]Support for Side by side installs #19582

Conversation

alex3305
Copy link

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

win_chocolatey

ANSIBLE VERSION
ansible 2.2.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
SUMMARY

This commit adds support for side by side installations of the different
versions of the same Chocolatey package in Ansible.

Internally the -m flag will be set when running the choco.exe install *
command. This will make Chocolatey disregard the currently installed
version and thus not upgrade, but install it side-by-side.

This change will probably be unsupported by some packages and maybe there
will be a need to provide a path to Ansible's win_chocolatey module, so it
is easier to manage multiple side-by-side installations of the same
package.

@ansibot
Copy link
Contributor

ansibot commented Dec 20, 2016

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 feature_pull_request module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. windows Windows community labels Dec 20, 2016
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 2, 2017
@gundalow gundalow removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. labels Jan 4, 2017
@jimi-c jimi-c removed the plugin label Jan 4, 2017
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. committer_review In order to be merged, this PR must follow the certified review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 4, 2017
@ansibot
Copy link
Contributor

ansibot commented Mar 1, 2017

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed committer_review In order to be merged, this PR must follow the certified review workflow. labels Mar 1, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 11, 2017
@lucalandi
Copy link

Can we get an update on this ? It's a really useful feature and I don't find any other way to inject it from win_chocolatey.

@ansibot ansibot added cloud support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed support:community This issue/PR relates to code supported by the Ansible community. labels Aug 24, 2017
@dagwieers
Copy link
Contributor

I still see 121 files changed :-/

@alex3305 alex3305 force-pushed the feature/win_chocolatey_multiple_versions branch from f7235c0 to ba065d6 Compare August 24, 2017 18:23
Since there were quite a lot of changes for the Ansible 2.3 and 2.4
releases in windows modules, this had to be rebased and resolved for
merging.
@alex3305 alex3305 force-pushed the feature/win_chocolatey_multiple_versions branch from ba065d6 to d468863 Compare August 24, 2017 18:28
@ansibot ansibot added module This issue/PR relates to a module. needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. support:community This issue/PR relates to code supported by the Ansible community. and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Aug 24, 2017
@alex3305
Copy link
Author

@dagwieers fixed that. Never used rebase before, sorry about that.

@ansibot ansibot removed the needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. label Aug 24, 2017
@mattclay
Copy link
Member

CI failure in integration tests:

{
"changed": false, 
"failed": true, 
"module_stderr": "At line:180 char:37\r\n+         [bool]$allowmultipleversions\r\n+                                     ~\r\nMissing ')' in function parameter list.\r\n\r\nAt line:156 char:1\r\n+ {\r\n+ ~\r\nMissing closing '}' in statement block.\r\n\r\nAt line:184 char:5\r\n+     )\r\n+     ~\r\nUnexpected token ')' in expression or statement.\r\n\r\nAt line:260 char:1\r\n+ }\r\n+ ~\r\nUnexpected token '}' in expression or statement.\r\n\r\nAt line:293 char:35\r\n+     if (Choco-IsInstalled $package) -and (-not $allowmultipleversions))\r\n+                                   ~\r\nMissing statement block after if ( condition ).\r\n\r\nAt line:263 char:1\r\n+ {\r\n+ ~\r\nMissing closing '}' in statement block.\r\n\r\nAt line:293 char:71\r\n+     if (Choco-IsInstalled $package) -and (-not $allowmultipleversions))\r\n+                                                                       ~\r\nUnexpected token ')' in expression or statement.\r\n\r\nAt line:373 char:1\r\n+ }\r\n+ ~\r\nUnexpected token '}' in expression or statement.\r\n\r\n\r\n    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordEx \r\n   ception\r\n    + FullyQualifiedErrorId : MissingEndParenthesisInFunctionParameterList\r\n \r\n\r\n", 
"module_stdout": "", 
"msg": "MODULE FAILURE", 
"rc": 1
}

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Aug 24, 2017
Rebase apparently went completely wrong with this one..

Sorry guys, normally we merge :).
@alex3305
Copy link
Author

@mattclay Fixed that for ya. The rebase went completely wrong. I had trouble rebasing the thing. Normally at work we use merge instead of rebase. Kinda confusing for the first time :). Should work now.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Aug 24, 2017
Copy link
Contributor

@jborean93 jborean93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there is a call to Choco-Upgrade that needs to have this new parameter passed in now. Once you fix up the minor things I'll do a test before merging.

@@ -176,7 +177,7 @@ Function Choco-Upgrade
[bool]$ignoredependencies,
[Parameter(Mandatory=$false, Position=10)]
[int]$timeout,
[Parameter(Mandatory=$false, Position=11)]
[Parameter(Mandatory=$false, Position=12)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change, should there be more lines to add allowmultipleversions to the 11th position?

This also went wrong during my rebase, this commit fixes that issue.
@jborean93
Copy link
Contributor

@alex3305, just tried this out locally and it doesn't work. When trying to install a newer version of putty side by side it just returns without a change. I believe the check Choco-IsInstalled is returning true and then just exists the function.

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 6, 2017
@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2017

@alex3305 alex3305 closed this Oct 12, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants