DSC: adding a custom resource to a composite resource -
i have composite resource. understanding composite resource collection of configurations treated resource. think of resources powershell module (but not). current file structure looks like:
composite resource:
…1 modules └ 2 defaultconfiguration └ 3 {version} ├ 4 dscresources │ ├ 5 happlygpo │ │ ├ 5a happlygpo.psd1 │ │ └ 5b happlygpo.schema.psm1 │ └ 6 hstoragepool │ ├ 6a hstoragepool.psd1 │ └ 6b hstoragepool.schema.psm1 └ 4a defaultconfiguration.psd1
i have written custom dsc resource using xdscresourcedesigner, has produced following file structure:
custom resource:
… 7 modules └ 8 happlygpo └ 9 1.0.0.0 ├ 10 dscresources │ └ 11 happlygpo │ ├ 11a happlygpo.psm1 │ └ 11b happlygpo.schema.mof └ 10a happlygpo.psd1
is possible merge 2 in happlygpo
resides inside defaultconfiguration
or happlygpo
have separate resource (module) referenced 5b (import-dscresource -modulename happlygpo
)?
if it's possible, in composite resource structure should files custom resource go? immediate thought merge 11 5, happens happlygpo.psd1 (5a , 10a).
tia
the composite resource module has same structure custom script resource module. difference there no psm1 file defines get, set, , test-targetresource functions. can copy folders inside dscresources folder custom resource module dscresources folder of composite resource or vice versa.
for example, check cwindowsos module have on github. combines custom resources composite resources in same resource module.
Comments
Post a Comment