Created
February 4, 2015 14:36
-
-
Save vinyar/8439c5895ec864d97741 to your computer and use it in GitHub Desktop.
chef file resource with laze attribute evaluation
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
file File.join(tmp_infra_dir, 'knife.rb') do | |
content lazy { | |
<<-EOH | |
node_name 'james' | |
chef_server_url '#{chef_server_url}' | |
client_key '#{tmp_infra_dir}/james.pem' | |
cookbook_path '#{Chef::Config[:cookbook_path]}' | |
trusted_certs_dir '#{Chef::Config[:trusted_certs_dir]}' | |
EOH | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment