srajappa
srajappa

Reputation: 481

Is there a better way to delete an installer after installation, in chef

eg.

remote_file '/app/abc/' + '/app.rpm' do
    source "https://location.com/app.rpm"
end
package 'app.rpm' do
    source '/app/abc/app.rpm'
end
file '/app/abc/app.rpm' do
    action :delete
end

This is how I am currently deleting the rpm file. Is there a better way to write the code, without having to include the file resource again ?

Upvotes: 0

Views: 26

Answers (1)

coderanger
coderanger

Reputation: 54181

We generally recommend not deleting so you can use the file for idempotence checks, using a notification to run the package install if the remote file changes.

Upvotes: 2

Related Questions