trondhindenes / AnsibleDscModuleGenerator

Scripts for generating Ansible modules from PowerShell DSC resources
MIT License
31 stars 2 forks source link

The DscModuleName parameter should not be mandatory #9

Closed it-praktyk closed 7 years ago

it-praktyk commented 8 years ago

The parameter currently is marked as mandatory. But for some resources the name of module is not fullfiled by Microsoft - e.g.

PS > Get-DscResource -Name file | fl

ResourceType  : MSFT_FileDirectoryConfiguration
Name          : File
FriendlyName  : File
Module        :
ModuleName    :
Version       :
Path          :
ParentPath    : C:\Windows\system32\Configuration\Schema\MSFT_FileDirectoryConfiguration
ImplementedAs : Binary
CompanyName   :
Properties    : {DestinationPath, Attributes, Checksum, Contents...}

BTW, the example included in the current version of code should throw execption :-)

trondhindenes commented 7 years ago

The file resource is weird, and as far as I know the only resource which doesnt belong in a module. For this reason it's impossible to invoke "File" resources using Invoke-DscResource, which is what is used under the covers.

So in short: Won't fix, because it's not fixable :-(