-
-
Notifications
You must be signed in to change notification settings - Fork 3
Get POSHDefault
Brandon Olin edited this page Jan 4, 2016
·
8 revisions
Retrieves a POSHOrigin configuration snippet as a hashtable that will be merged with the calling configuration resource. Useful for re-using partial configuration options across resources. Configuration snippets are hashtables saved with a .psd1 file extension.
| Name | Type | Required | Description |
|---|---|---|---|
| Configuration | string | True | Name of configuration snippet to retrieve. Do not include the file extension (.psd1) |
| Path | string | False | Path to folder that holds the configuration snippets. Default value is retrieved from the configs_path parameter stored in $env:USERPROFILE.poshorigin\options.json |
gpd
Defines a vSphere:VM resource and retrieves the disk information from a configuration snippet named standard_disks.psd1.
@{
name = 'Hard disk 1'
sizeGB = 50
type = 'flat'
format = 'Thick'
volumeName = 'C'
volumeLabel = 'NOS'
blockSize = 4096
},
@{
name = 'Hard disk 2'
sizeGB = 100
type = 'flat'
format = 'Thick'
volumeName = 'D'
volumeLabel = 'Data'
blockSize = 4096
}resource 'POSHOrigin_vSphere:VM' 'VM01' @{
ensure = 'present'
description = 'Test VM'
###
# Other options omitted for brevity
###
disks = Get-POSHDefault 'standard_disks'
}- Home
- Quickstart
- What is POSHOrigin?
- Setup / Initialization
- Configuration File
- Defaults File
- Loading Configurations
- Testing Configurations
- Executing Configurations
- Sharing Configurations
- Modules
- Credentials
- Using Secrets
- Using Resolvers