mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-07-01 01:06:05 +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
|
# Recipe:: chatbot
|
||||||
#
|
#
|
||||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
include_recipe 'metasploitable::chatbot'
|
include_recipe 'metasploitable::ruby23'
|
||||||
|
include_recipe 'metasploitable::nodejs'
|
||||||
|
|
||||||
package 'unzip'
|
package 'unzip'
|
||||||
|
|
||||||
package 'npm'
|
bash "Install dependencies" do
|
||||||
|
code <<-EOH
|
||||||
package 'bundler'
|
npm install express
|
||||||
|
npm install cors
|
||||||
|
EOH
|
||||||
|
end
|
||||||
|
|
||||||
cookbook_file '/tmp/chatbot.zip' do
|
cookbook_file '/tmp/chatbot.zip' do
|
||||||
source 'chatbot/chatbot.zip'
|
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::ruby23'
|
||||||
|
include_recipe 'metasploitable::nodejs'
|
||||||
|
|
||||||
package 'git'
|
package 'git'
|
||||||
package 'nodejs'
|
|
||||||
|
|
||||||
directory '/opt/readme_app' do
|
directory '/opt/readme_app' do
|
||||||
mode '0777'
|
mode '0777'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Cookbook:: sinatra
|
# Cookbook:: metasploitable
|
||||||
# Recipe:: sinatra
|
# Recipe:: sinatra
|
||||||
#
|
#
|
||||||
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
# Copyright:: 2017, Rapid7, All Rights Reserved.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user