Rob Sterenborg
07/13/2022, 10:38 AM$dsc_logpath for debugging output, it only shows a single backslash, and that also happens when I dump the variable to a text file. Which at least to me is quite confusing: if there is a double backslash inside the string, I would expect them both to be displayed so I know that everything is fine. The content of the catalog seems to agree with me. However, back on topic...
I applied the following using `puppet apply`:
dsc_xwindowspackagecab {'NET-Framework-Core':
dsc_ensure => 'Present',
dsc_name => 'Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~10.0.17763.1',
dsc_sourcepath => 'C:\\Temp\\microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab',
dsc_logpath => 'C:\\Temp\\microsoft-windows-netfx3-ondemand-package-31bf3856ad364e35-amd64--.log',
}
This results in:
PS C:\temp> puppet apply .\t2.pp
Notice: Compiled catalog for <testhost1> in environment puppetwindows_rst_dsc_new in 0.38 seconds
Notice: /Stage[main]/Main/Dsc_xwindowspackagecab[NET-Framework-Core]/dsc_logpath: dsc_logpath changed to 'C:\Temp\microsoft-windows-netfx3-ondemand-package-31bf3856ad364e35-amd64--.log'
Notice: dsc_xwindowspackagecab[{:name=>"NET-Framework-Core", :dsc_name=>"Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~10.0.17763.1"}]: Updating: Finished in 13.63 seconds
Notice: Applied catalog in 14.95 seconds
PS C:\temp>
PS C:\temp>
PS C:\temp>
PS C:\temp> puppet apply .\t2.pp
Notice: Compiled catalog for <testhost1> in environment puppetwindows_rst_dsc_new in 0.16 seconds
Notice: /Stage[main]/Main/Dsc_xwindowspackagecab[NET-Framework-Core]/dsc_logpath: dsc_logpath changed to 'C:\Temp\microsoft-windows-netfx3-ondemand-package-31bf3856ad364e35-amd64--.log'
Notice: dsc_xwindowspackagecab[{:name=>"NET-Framework-Core", :dsc_name=>"Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~10.0.17763.1"}]: Updating: Finished in 9.40 seconds
Notice: Applied catalog in 10.84 seconds
The calalog (still) shows:
{
"type": "Dsc_xwindowspackagecab",
"title": ".NET Framework 3.5",
"tags": [
"dsc_xwindowspackagecab",
"class",
"platform::pre::windows_features_role",
"platform",
"pre",
"windows_features_role",
"platform::pre2",
"pre2"
],
"file": "/etc/puppetlabs/code/environments/puppetwindows_rst_dsc_new/modules/platform/manifests/pre/windows_features_role.pp",
"line": 55,
"exported": false,
"kind": "compilable_type",
"parameters": {
"dsc_ensure": "Present",
"dsc_sourcepath": "C:\\Temp\\microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab",
"dsc_name": "Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~10.0.17763.1",
"dsc_logpath": "C:\\Temp\\microsoft-windows-netfx3-ondemand-package-31bf3856ad364e35-amd64--.log"
}
},
So the dsc_xwindowspackagecab resource wants to change the dsc_logpath from having double backslashes to having single backslashes, even though that's not what the code says, and it also doesn't end up in the catalog.
If you really need me to test this in the actual Puppet code, then I'll need more time to make that happen.