-
-
Notifications
You must be signed in to change notification settings - Fork 3
Defaults File
Brandon Olin edited this page Jan 4, 2016
·
10 revisions
The defaults file is where you can store common resource configuration data that will be shared across multiple configurations. When each resource block in your configuration is processed, if it specifies a defaults file, those defaults will be converted into a hashtable that will get merged with the hashtable of the resource. If there are any duplicates between the defaults file and the resource block, the values from the resource block will be used.
######file_defaults.psd1
@{
ensure = 'present'
path = 'c:\'
contents = 'this is some content'
}######files.ps1
resource 'POSHOrigin:POSHFile' 'file1.txt' @{
defaults = '.\file_defaults.psd1'
}The examples above are the equivalent of specifying all options in the configuration file.
######create_file.ps1
resource 'POSHOrigin:POSHFile' 'file1.txt' @{
ensure = 'present'
path = 'c:\'
contents = 'this is some content'
}- 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