forked from jpogran/PuppetDscBuilder
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…izing_custom_modules (GH-64) Add docs for customizing private modules
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ import | |
.vagrant/ | ||
*Results.xml | ||
Puppet.Dsc/ | ||
docs/ | ||
!docs/about* | ||
docs/* | ||
!docs/about_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Puppetizing Custom Modules | ||
|
||
## about_Puppetizing_Custom_Modules | ||
|
||
# SHORT DESCRIPTION | ||
|
||
Explanation of when & how to use `puppet.dsc` to convert private/internal PowerShell modules into Puppet modules. | ||
|
||
# LONG DESCRIPTION | ||
|
||
Sometimes you may want to puppetize a PowerShell module with DSC Resources which is _not_ published to the [Public PowerShell Gallery](https://www.powershellgallery.com/) - for any reason, but often because the resources include business-specific logic. | ||
|
||
Luckily, `Puppet.Dsc` makes no distinction between PowerShell modules with DSC Resources which are public and private; you just need to tell it _where_ to find the modules to Puppetize. | ||
|
||
The `New-PuppetDscModule` function is able to transparently use any valid PSRepository feed to retrieve PowerShell modules with DSC Resources: | ||
|
||
```powershell | ||
# To puppetize from an alternate PSRepository feed | ||
# Make sure to replace 'MyRepository' with your repository name | ||
New-PuppetDscModule -PowerShellModuleName PowerShellGet -PowerShellModuleVersion 2.2.3 -Repository MyRepository | ||
``` | ||
|
||
If you don't already have a private PSRepository feed, you can [add one](https://docs.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-local-psrepositories?view=powershell-7.1) via the Microsoft docs. | ||
You can even [register a PSRepository for a local or shared folder](https://docs.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-local-psrepositories?view=powershell-7.1#registering-a-local-repository)! | ||
|
||
Once you have the repository added, you need to remember to specify the `Repository` parameter when calling `New-PuppetDscModule` - otherwise it will default to the [Public PowerShell Gallery](https://www.powershellgallery.com/). |