Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the spec for DSCConfigurations. #3749

Merged
merged 2 commits into from
Aug 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
"$ref": "./examples/getDscConfigurationContent.json"
}
},
"produces": [
"text/powershell"
],
"parameters": [
{
"$ref": "../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter"
Expand All @@ -303,7 +306,7 @@
"200": {
"description": "OK",
"schema": {
"type": "string"
"type": "file"
}
},
"default": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"responses": {
"200": {
"headers": {},
"headers": {
"Content-Type": "text/powershell"
},
"body": "\tconfiguration TemplateWithConfigData{\r\n <#\r\n .DESCRIPTION\r\n DSC Coniguration that uses ConfigData file\r\n\r\n .EXAMPLE\r\n TemplateWithConfigData -outpath c:\\dsc\\\r\n\r\n .NOTES\r\n This configuration requires the corresponding configdata file\r\n #>\r\n\r\n Import-DscResource -ModuleName 'PSDesiredStateConfiguration', @{ModuleName='xPSDesiredStateConfiguration';ModuleVersion='5.0.0.0'\r\n }\r\n \r\n Node $AllNodes.NodeName{\r\n # WindowsOptionalFeature is compatible with the Nano Server installation option\r\n File testfile{\r\n Ensure = 'Present'\r\n DestinationPath = $Data.Path\r\n Contents = $Data.Contents\r\n }\r\n xArchive testarchive{\r\n Ensure = 'Present'\r\n Destination = $Data.Destination\r\n Path = (Get-ChildItem $Data.Path).ParentFolder\r\n }\r\n }\r\n }\r\n\r\nconfiguration TemplateBasic{\r\n <#\r\n .DESCRIPTION\r\n Basic configuration template\r\n\r\n .EXAMPLE\r\n TemplateBasic -outpath c:\\dsc\\\r\n\r\n .NOTES\r\n This is the most basic configuration and does not take parameters or configdata\r\n #>\r\n\r\n Import-DscResource -module 'PSDesiredStateConfiguration'\r\n \r\n Node localhost{\r\n # WindowsOptionalFeature is compatible with the Nano Server installation option\r\n File testfile{\r\n Ensure = 'Present'\r\n DestinationPath = 'c:\\filetoo.txt'\r\n Contents = 'this is some text too'\r\n }\r\n }\r\n }"
}
}
Expand Down