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

cannot set version for windowspowershell provider #12

Closed
spali opened this issue Jun 19, 2018 · 2 comments
Closed

cannot set version for windowspowershell provider #12

spali opened this issue Jun 19, 2018 · 2 comments

Comments

@spali
Copy link

spali commented Jun 19, 2018

Module version: 1.0.0
OS: Windows 2016 1607 (Build: 14393.2312)
Powershell Version: 5.1.14393.2312
Ruby: ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
Puppet: 5.3.3

  psrepository { 'PSGallery':
    ensure              => present,
    source_location     => 'https://www.powershellgallery.com/api/v2/',
    installation_policy => 'trusted',
    provider            => 'windowspowershell',
  }

  package { 'PSWindowsUpdate':
    ensure   => '2.0.0.4',
    source   => 'PSGallery',
    provider => 'windowspowershell',
  }

produces:

Error: Failed to apply catalog: Parameter ensure failed on Package[PSWindowsUpdate]: Provider windowspowershell must have features 'versionable' to set 'ensure' to '2.0.4' at /etc/puppetlabs/code/environments/production/site/profile/manifests/windows/update/install.pp:11

If i use latest, it works.

Don't know much about ruby and creating custom providers, but if I'm not wrong, you are inheriting the provider windowspowershell from the powershellcore which has versionable as feature defined.
Seems not to be inherited?

@rsteenwyk
Copy link

I can replicate the same issue, I'm not sure how to fix it but this would definitely enhance the module a ton to get this working.

@hbuckle
Copy link
Owner

hbuckle commented Jul 12, 2018

2.0.0 sets :versionable on the windowspowershell provider

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

No branches or pull requests

3 participants