Update nodejs, sudo and users cookbooks

This commit is contained in:
Greg Karékinian
2018-04-17 13:18:09 +02:00
parent ff2f424ddb
commit 157ccdc8b7
37 changed files with 862 additions and 523 deletions

View File

@@ -1,9 +1,9 @@
#
# Author:: Marius Ducea (marius@promethost.com)
# Cookbook Name:: nodejs
# Cookbook:: nodejs
# Recipe:: source
#
# Copyright 2010-2012, Promet Solutions
# Copyright:: 2010-2017, Promet Solutions
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,29 +20,19 @@
Chef::Recipe.send(:include, NodeJs::Helper)
node.force_override['nodejs']['install_method'] = 'source' # ~FC019
include_recipe 'build-essential'
case node['platform_family']
when 'rhel', 'fedora'
package 'openssl-devel'
package 'xz'
when 'rhel', 'fedora', 'amazon'
package %w(openssl-devel tar)
when 'debian'
package 'libssl-dev'
package 'xz-utils'
end
version = "v#{node['nodejs']['version']}/"
prefix = node['nodejs']['prefix_url'][node['nodejs']['engine']]
if node['nodejs']['engine'] == 'iojs'
filename = "iojs-v#{node['nodejs']['version']}.tar.xz"
archive_name = 'iojs-source'
else
filename = "node-v#{node['nodejs']['version']}.tar.xz"
archive_name = 'nodejs-source'
end
prefix = node['nodejs']['prefix_url']['node']
filename = "node-v#{node['nodejs']['version']}.tar.gz"
archive_name = 'nodejs-source'
nodejs_src_url = node['nodejs']['source']['url'] || ::URI.join(prefix, version, filename).to_s