I am having syntax errors and I am unsure how to resolve them. In the roles file I have defined the fallowing:
default_attributes(
\'jdk\' => {
\'v
You should escape all double quotes in your command string, because it starts and ends with double quotes.
There is no action :creates for execute resource. The action should be :run.
execute "update_alt_java" do
command "update-alternatives --install \"/usr/bin/java\" \"java\" \"#{node['java']['home']}/bin/java\" 1"
action :run
end
But you don't want to run this resource on every chef run, so you should come up with some kind of condition, when it should be run (using only_if, not_if statements).