diff options
author | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-01-20 11:12:16 -0800 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2015-01-20 11:33:57 -0800 |
commit | 46bda1acef603842ab50d2a54e6f70177367a512 (patch) | |
tree | c0bc091c7c6ee6fe5b98b0add6d7edfd87ea4c64 /lib/chef/resource | |
parent | e90c6733ad1d64b94b0a29bfac11bf29f188a203 (diff) | |
download | chef-46bda1acef603842ab50d2a54e6f70177367a512.tar.gz |
Added imports to dsc_script resource.
This allows the dsc_script resource to import dsc resources
when specifying code. For example:
```ruby
dsc_script 'RDP' do
imports "cRDPEnabled" => ["PSHOrg_cRDPEnabled"]
code <<-EOH
cRDPEnabled "enablerdp"
{
Enabled = $True
}
EOH
end
```
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/dsc_script.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/resource/dsc_script.rb b/lib/chef/resource/dsc_script.rb index 82907c25db..43a64c4628 100644 --- a/lib/chef/resource/dsc_script.rb +++ b/lib/chef/resource/dsc_script.rb @@ -89,6 +89,14 @@ class Chef ) end + def imports(arg=nil) + set_or_return( + :imports, + arg, + :kind_of => [ Hash ] + ) + end + def flags(arg=nil) set_or_return( :flags, |