mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-06-28 15:55:47 +02:00
Move nodejs install to separate recipe.
This commit is contained in:
parent
c03cbe633e
commit
1eae27f271
|
@ -1,18 +1,22 @@
|
|||
#
|
||||
# Cookbook:: chatbot
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: chatbot
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
#
|
||||
#
|
||||
|
||||
include_recipe 'metasploitable::chatbot'
|
||||
include_recipe 'metasploitable::ruby23'
|
||||
include_recipe 'metasploitable::nodejs'
|
||||
|
||||
package 'unzip'
|
||||
|
||||
package 'npm'
|
||||
|
||||
package 'bundler'
|
||||
bash "Install dependencies" do
|
||||
code <<-EOH
|
||||
npm install express
|
||||
npm install cors
|
||||
EOH
|
||||
end
|
||||
|
||||
cookbook_file '/tmp/chatbot.zip' do
|
||||
source 'chatbot/chatbot.zip'
|
||||
|
|
14
chef/cookbooks/metasploitable/recipes/nodejs.rb
Normal file
14
chef/cookbooks/metasploitable/recipes/nodejs.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: nodejs
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
#
|
||||
#
|
||||
|
||||
execute "apt-get update" do
|
||||
command "apt-get update"
|
||||
end
|
||||
|
||||
package 'nodejs'
|
||||
package 'npm'
|
|
@ -7,9 +7,9 @@
|
|||
#
|
||||
|
||||
include_recipe 'metasploitable::ruby23'
|
||||
include_recipe 'metasploitable::nodejs'
|
||||
|
||||
package 'git'
|
||||
package 'nodejs'
|
||||
|
||||
directory '/opt/readme_app' do
|
||||
mode '0777'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Cookbook:: sinatra
|
||||
# Cookbook:: metasploitable
|
||||
# Recipe:: sinatra
|
||||
#
|
||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||
|
|
Loading…
Reference in New Issue
Block a user