Use ruby-build for Mastodon, update cookbooks

This uses the ruby_build provider for Mastodon, installing Ruby 2.4.1
currently. It also updates some other cookbooks and the runlists.
This commit is contained in:
2017-04-17 11:40:31 +02:00
parent 4530190df6
commit 54332db8de
96 changed files with 2830 additions and 903 deletions

View File

@@ -1,10 +1,10 @@
#
# Author:: Joshua Timberman (<jtimberman@chef.io>)
# Author:: Graeme Mathieson (<mathie@woss.name>)
# Cookbook Name:: homebrew
# Cookbook:: homebrew
# Recipe:: default
#
# Copyright 2011-2015, Chef Software, Inc.
# Copyright:: 2011-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,16 +19,15 @@
# limitations under the License.
#
Chef::Resource.send(:include, Homebrew::Mixin)
Chef::Recipe.send(:include, Homebrew::Mixin)
homebrew_go = "#{Chef::Config[:file_cache_path]}/homebrew_go"
Chef::Log.debug("Homebrew owner is '#{homebrew_owner}'")
remote_file homebrew_go do
source 'https://raw.githubusercontent.com/Homebrew/install/master/install'
mode 00755
source node['homebrew']['installer']['url']
checksum node['homebrew']['installer']['checksum'] unless node['homebrew']['installer']['checksum'].nil?
mode '755'
not_if { ::File.exist? '/usr/local/bin/brew' }
end
execute 'install homebrew' do
@@ -38,6 +37,13 @@ execute 'install homebrew' do
not_if { ::File.exist? '/usr/local/bin/brew' }
end
execute 'set analytics' do
environment lazy { { 'HOME' => ::Dir.home(homebrew_owner), 'USER' => homebrew_owner } }
user homebrew_owner
command "/usr/local/bin/brew analytics #{node['homebrew']['enable-analytics'] ? 'on' : 'off'}"
only_if { shell_out('/usr/local/bin/brew analytics state', user: homebrew_owner).stdout.include?('enabled') != node['homebrew']['enable-analytics'] }
end
if node['homebrew']['auto-update']
package 'git' do
not_if 'which git'