-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract separate recipe for different install
- Loading branch information
1 parent
abf0243
commit 50fa383
Showing
3 changed files
with
35 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
case node['grafana']['file']['type'] | ||
when "zip" | ||
include_recipe 'ark::default' | ||
ark 'grafana' do | ||
url node['grafana']['file']['url'] | ||
path node['grafana']['install_path'] | ||
checksum node['grafana']['file']['checksum'] | ||
owner grafana_user | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
strip_leading_dir false | ||
action :put | ||
end | ||
node.set['grafana']['web_dir'] = node['grafana']['install_dir'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
include_recipe "git" | ||
|
||
git "#{node['grafana']['install_dir']}/#{node['grafana']['git']['branch']}" do | ||
repository node['grafana']['git']['url'] | ||
reference node['grafana']['git']['branch'] | ||
case node['grafana']['git']['type'] | ||
when "checkout" | ||
action :checkout | ||
when "sync" | ||
action :sync | ||
end | ||
user grafana_user | ||
This comment has been minimized.
Sorry, something went wrong. |
||
end | ||
|
||
link "#{node['grafana']['install_dir']}/current" do | ||
to "#{node['grafana']['install_dir']}/#{node['grafana']['git']['branch']}" | ||
end | ||
|
||
node.set['grafana']['web_dir'] = "#{node['grafana']['install_dir']}/current/src" |
grafana_user is not defined here