Skip to content

Commit

Permalink
Control package action via attributes
Browse files Browse the repository at this point in the history
Upgrade action does not allow precise control of the installed version
This commit introduce a new attribute allowing to change the action
performed by the package.

Signed-off-by: Baptiste Courtois <b.courtois@criteo.com>
  • Loading branch information
Annih committed Mar 2, 2017
1 parent 2ec589f commit 8626eee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"source" => nil,
"version" => nil,
"provider" => nil,
"action" => :upgrade,
}

default["logrotate"]["directory"] = "/etc/logrotate.d"
Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
provider node["logrotate"]["package"]["provider"] if node["logrotate"]["package"]["provider"]
source node["logrotate"]["package"]["source"] if node["logrotate"]["package"]["source"]
version node["logrotate"]["package"]["version"] if node["logrotate"]["package"]["version"]
action :upgrade
action node["logrotate"]["package"]["action"]
end

directory node["logrotate"]["directory"] do
Expand Down

0 comments on commit 8626eee

Please sign in to comment.