execute ‘get_ora_12c_client’ do
command "curl -kO #{tarsrc}"
user 'oracle’
group 'dba’
cwd "#{tartarget}"
end
Suppose i am using this resource to get a tarball from http server… is there a way to skip this resource when the tar is already present.
not_if guard will come handy for you. You can use it something like this:
target_directory = 'target file location'
execute ‘get_ora_12c_client’ do
command "curl -kO #{tarsrc}"
user 'oracle’
group 'dba’
cwd "#{tartarget}"
not_if { File.exist?(target_directory) }
end