|
24 | 24 |
|
25 | 25 | ## Module description |
26 | 26 |
|
27 | | -The Puppet dsc_lite module allows you to manage target nodes using Windows PowerShell DSC (Desired State Configuration) Resources. |
| 27 | +The Puppet `dsc_lite` module allows you to manage target nodes using arbitrary Windows PowerShell DSC (Desired State Configuration) Resources. |
28 | 28 |
|
29 | | -**Note that using dsc_lite requires previous experience with DSC and PowerShell, unlike our other modules that are easier to get started with. It is an alternative approach to Puppet's dsc module, providing more flexibility for advanced users.** |
| 29 | +### Warning: |
| 30 | + |
| 31 | +***Using dsc_lite requires advanced experience with DSC and PowerShell, unlike our other modules that are far easier to use. It is an alternative approach to Puppet's family of [DSC modules](http://forge.puppet.com/dsc), providing more flexibility for certain niche use cases. There are many drawbacks to this approach and we highly recommend that you use the existing family of [DSC modules](http://forge.puppet.com/dsc) instead, where possible.*** |
| 32 | + |
| 33 | +The `dsc_lite` module contains a lightweight `dsc` type, which is a streamlined and minimal representation of a DSC Resource declaration in Puppet syntax. This type does not contain any DSC resources itself, but can invoke arbitrary DSC Resources that already exist on the managed node. Much like the `exec` type, it simply passes parameters through to the underlying DSC Resource without any validation. |
| 34 | + |
| 35 | +This means that you are responsible for: |
| 36 | + |
| 37 | +1. Distributing the DSC Resources as needed to your managed nodes. |
| 38 | +1. Validating all configuration data for `dsc` declarations to prevent runtime errors. |
| 39 | +1. Troubleshooting all errors without property status reporting. |
| 40 | + |
| 41 | +The existing family of [DSC modules](http://forge.puppet.com/dsc) will manage all the DSC administration for you, meaning that all you need to do is install the module and start writing code. These modules also do parameter validation, meaning that errors surface during development instead of at runtime. And the VS Code integration will show you usage documentation as you write the code. These modules are automatically imported from the PowerShell Gallery on a daily basis, so they're always up to date. |
| 42 | + |
| 43 | +You should *only* use the `dsc_lite` module when any of these cases apply to you: |
| 44 | + |
| 45 | +* You need to use multiple versions of the same DSC resource |
| 46 | +* The upstream DSC Resource's implementation does not match its declared API but is usable otherwise and needed. |
| 47 | + * In this case, `dsc_lite` should be treated as a stop-gap solution until the upstream DSC Resource can be patched to fix the misimplementation. |
| 48 | +* You need to use a DSC Resource that isn't published to the [Puppet Forge](http://forge.puppet.com/dsc). |
| 49 | + * If you find a DSC Resource that hasn't been automatically imported, it's very likely due to an API mismatch as described above. |
| 50 | + * If you have custom DSC Resources, you can use the [Puppet.dsc module builder](https://github.com/puppetlabs/Puppet.Dsc) to build your own Puppet module from it. |
| 51 | + |
| 52 | +------ |
30 | 53 |
|
31 | 54 | ### Windows system prerequisites |
32 | 55 |
|
@@ -159,7 +182,7 @@ The module supports configuring repository sources and other `PackageManagement` |
159 | 182 |
|
160 | 183 | #### Chocolatey |
161 | 184 |
|
162 | | -Puppet already works well with [chocolatey](https://chocolatey.org/). You can create chocolatey packages that wrap the DSC Resources you need. |
| 185 | +Puppet already works well with [chocolatey](https://chocolatey.org/). You can create chocolatey packages that wrap the DSC Resources you need. |
163 | 186 |
|
164 | 187 | ~~~puppet |
165 | 188 | package { 'xPSDesiredStateConfiguration': |
@@ -295,7 +318,6 @@ For information on the types, see [REFERENCE.md](https://github.com/puppetlabs/p |
295 | 318 |
|
296 | 319 | ## Limitations |
297 | 320 |
|
298 | | -* For a list of tradeoffs and improvements in the dsc_lite module compared to the dsc module, see [README_Tradeoffs.md](https://github.com/puppetlabs/puppetlabs-dsc_lite/blob/master/README_Tradeoffs.md) |
299 | 321 | * DSC Composite Resources are not supported. |
300 | 322 | * DSC requires PowerShell `Execution Policy` for the `LocalMachine` scope to be set to a less restrictive setting than `Restricted`. If you see the error below, see [MODULES-2500](https://tickets.puppet.com/browse/MODULES-2500) for more information. |
301 | 323 |
|
|
0 commit comments