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

Add accept_license option to win_psmodule #411

Merged

Conversation

briantist
Copy link
Contributor

SUMMARY

Fixes #340

Adds accept_license option to win_psmodule so that modules requiring license acceptance can be installed.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

win_psmodule

ADDITIONAL INFORMATION

N/A

@briantist briantist force-pushed the win_psmodule/accept_license branch from 6757c6d to d2bca4f Compare July 9, 2022 14:05
@briantist
Copy link
Contributor Author

It turns out the way to use PowerShellGet Format 2.0 is to add a tag with the value of PowerShellGetFormatVersion_2.0 to module 😖 ...cool.

@briantist briantist marked this pull request as ready for review July 9, 2022 15:31
@briantist
Copy link
Contributor Author

briantist commented Jul 9, 2022

The remaining failures are all galaxy 429 errors.
The last commit 3e79a3c only adds a single sentence to a docs description.

The checks on the previous commit 8db3006 all completed successfully.

@briantist briantist closed this Jul 9, 2022
@briantist briantist reopened this Jul 9, 2022
@jborean93
Copy link
Collaborator

Looks like -AcceptLicense and other license functionality was added in PowerShellGet 1.5.0 which is below our minimum requirements of 1.6.0. The changes here should be fine as long as someone follows our requirements note.

@jborean93 jborean93 merged commit 8ebbf99 into ansible-collections:main Jul 11, 2022
@briantist briantist deleted the win_psmodule/accept_license branch July 11, 2022 12:40
@coreydeli
Copy link

I am not sure that this is working as expected.

"msg": "Problems installing PowerShellGet module: A parameter cannot be found that matches parameter name 'AcceptLicense'.",

is what I am receiving while using

    - name: Install PowerShellGet
      community.windows.win_psmodule:
        name: PowerShellGet
        accept_license: yes
        state: latest

@briantist
Copy link
Contributor Author

@Iwifia the change has not been released yet as far as I know, you could work around it now with an earlier version of the collection, or by installing from git. This may help:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_psmodule needs to address -AcceptLicense parameter
3 participants