-apt_source "elasticsearch1.7" do
- source_template "elasticsearch.list.erb"
- url "https://packages.elasticsearch.org/elasticsearch/1.7/debian"
- key "D27D666CD88E42B4"
-end
-
-apt_source "elasticsearch2.x" do
- source_template "elasticsearch.list.erb"
- url "https://packages.elasticsearch.org/elasticsearch/2.x/debian"
- key "D27D666CD88E42B4"
-end
-
-apt_source "elasticsearch5.x" do
- source_template "elasticsearch.list.erb"
- url "https://artifacts.elastic.co/packages/5.x/apt"
+apt_repository "elasticsearch5.x" do
+ action repository_actions["elasticsearch5.x"]
+ uri "https://artifacts.elastic.co/packages/5.x/apt"
+ distribution "stable"
+ components ["main"]