Open it-praktyk opened 8 years ago
Hm, not sure I understand. What do you propose?
The amount of DSC resources is limited. For known resources the module AnsibleDscModuleGenerator can contains e.g. psd1 files - (considered can be also other formats https://ramblingcookiemonster.github.io/PowerShell-Configuration-Data/ ) containing data to fullfil informaiton for Ansible modules. I'll try prepare proposed implementation soon.
Great, thanks. Still not sure what exactly you mean, but always open for suggestions!
Example of descriptions can be stored with names like DSCModuleName
Name1, Name2 they are DSCResourceNames
{
Name1: {
"AnsibleVersion":"1.0.0",
"ShortDescription":"This is short description used for that DSCResourceName in Ansible module",
"LongDescription":"This is long description used for thatDSCResourceName in Ansible module"
},
Name2: {
"AnsibleVersion":"1.0.0",
"ShortDescription":"This is short description used for that DSCResourceName in Ansible module",
"LongDescription":"This is long description used for thatDSCResourceName in Ansible module"
}
}
Data stored in the file can be read
PS > ConvertFrom-Json -InputObject (Get-Content -Path DSCModuleName.json -Raw ) | select -ExpandProperty name1 | fl
AnsibleVersion : 1.0.0
ShortDescription : This is short description used for that DSCResourceName in Ansible module
LongDescription : This is long description used for thatDSCResourceName in Ansible module
Files with descriptions can be part of your module.
Please check my fork.
In the next step I'll implement the rest of code marked now as ParameterSetName= "DescByParameters".
Do you use any automat to prepare values to HelpObject ?
The parts of descriptions for known modules (e.g. published in DSC Resource Kit) can be fullfiled from previously prepared data files what can be part of module.
What do you think?