Created
June 2, 2014 10:18
-
-
Save tkuchiki/0901ae07b7b954963682 to your computer and use it in GitHub Desktop.
ruby_block の中で、template resource を実行する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby_block "create template" do | |
block do | |
template = Chef::Resource::Template.new("/path/to/file", run_context) | |
template.owner "root" | |
template.cookbook "COOKBOOK_NAME" | |
template.mode 0644 | |
template.source "conffile.erb" | |
template.variables({ | |
:foo => "bar", | |
}) | |
template.run_action(:create) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment