devblackops / POSHOrigin

PowerShell framework for defining and invoking custom DSC resources to provision infrastructure.
Apache License 2.0
56 stars 3 forks source link

Add support for using a git repository as the source of a module #19

Closed devblackops closed 8 years ago

devblackops commented 8 years ago

Expected Behavior

It would be nice to allow POSHOrigin modules to be stored in git and then be referenced by URL. This way, configurations can be shared from a central location.

module 'my_compute' @{
    source = 'git://github.com/<username>/<module>.git'
    param1 = 'foo'
    param2 = 'bar'
}

Current Behavior

Currently, the module source property only supports local or SMB paths to folder/files.

Possible Solution

Add support to New-POSHOriginResourceFromModule for cloning a git repository down to a temporary location, then running any POSHOrigin resources defined within. This assumes that git.exe is available on the system executing the module.