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

Error when applying dsc_certificateimport and dsc_xhotfix in the same run #203

Closed
cpiment opened this issue Feb 4, 2023 · 3 comments · Fixed by #234
Closed

Error when applying dsc_certificateimport and dsc_xhotfix in the same run #203

cpiment opened this issue Feb 4, 2023 · 3 comments · Fixed by #234
Labels
bug Something isn't working community

Comments

@cpiment
Copy link

cpiment commented Feb 4, 2023

Hi team,

I'm not sure if I have to open this ticket here or on the DSC resources Github repo, so if I should open it on other project please let me know.

I'm trying to apply this puppet file in a Windows Server box:

dsc_certificateimport { "Remove cert from Root":
      dsc_ensure     => 'Absent',
      dsc_thumbprint => '00112233445566778899aabbccddeeff00112233',
      dsc_store      => 'Root',
      dsc_location   => 'LocalMachine',
    }

dsc_xhotfix { 'Powershell 5.1':
      dsc_ensure => 'Present',
      dsc_path   => 'f:/win8.1andw2k12r2-kb3191564-x64.msu',
      dsc_id     => 'KB3191564',
      validation_mode => 'resource',
    }

But it fails with this error:

"Could not find mandatory property Id. Add this property and try again."

However, if I make a file with only the dsc_xhotfix resource, it runs OK. I'm attaching two debug logs, one trying to apply the file with the two resources, and one trying to apply the file with onlye the dsc_xhotfix resource.

ok.log
error.log

Thanks in advance for your help.

Versions:
OS: Win Server 2012 R2
Powershell version: 5.1
Puppet agent version: 7.21.0
Modules:
mod 'puppetlabs-pwshlib', '0.10.3'
mod 'dsc-xwindowsupdate', '2.8.0-0-4'
mod 'dsc-certificatedsc', '5.1.0-0-2'

@cpiment
Copy link
Author

cpiment commented Feb 4, 2023

I have been reviewing closed issues and this looks similar to #97

@Hvid
Copy link
Contributor

Hvid commented Feb 13, 2023

There is a workaround here: puppetlabs/Puppet.Dsc#242

Hvid added a commit to Hvid/ruby-pwsh that referenced this issue Feb 15, 2023
@cpiment
Copy link
Author

cpiment commented Feb 20, 2023

Hi @Hvid

Thanks for your suggestion. I have updated my Puppetfile with this content:

mod 'puppetlabs-pwshlib',
  git: 'https://github.com/ShawnHardwick/ruby-pwsh',
  commit: '451de92ef9160277f68112371ab2fa171129ec4c'

and now it does not fail. I'm going to follow the PR you opened to see if this is the definitive solution or something else is needed.

@jordanbreen28 jordanbreen28 added the bug Something isn't working label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community
Projects
None yet
4 participants