Skip to content

Instantly share code, notes, and snippets.

@toby-griffiths
Last active November 2, 2015 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toby-griffiths/5fb1da8a909310bca040 to your computer and use it in GitHub Desktop.
Save toby-griffiths/5fb1da8a909310bca040 to your computer and use it in GitHub Desktop.
Problem npm installing less module for all versions
# This file manages Puppet module dependencies.
#
# It works a lot like Bundler. We provide some core modules by
# default. This ensures at least the ability to construct a basic
# environment.
# Shortcut for a module from GitHub's boxen organization
def github(name, *args)
options ||= if args.last.is_a? Hash
args.last
else
{}
end
if path = options.delete(:path)
mod name, :path => path
else
version = args.first
options[:repo] ||= "boxen/puppet-#{name}"
mod name, version, :github_tarball => options[:repo]
end
end
# Shortcut for a module under development
def dev(name, *args)
mod "puppet-#{name}", :path => "#{ENV['HOME']}/src/boxen/puppet-#{name}"
end
# Includes many of our custom types and providers, as well as global
# config. Required.
github "boxen", "3.11.0"
# Support for default hiera data in modules
github "module_data", "0.0.4", :repo => "ripienaar/puppet-module-data"
# Core modules for a basic development environment. You can replace
# some/most of these if you want, but it's not recommended.
github "brewcask", "0.0.6"
github "dnsmasq", "2.0.1"
github "foreman", "1.2.0"
github "gcc", "3.0.2"
github "git", "2.7.92"
github "go", "2.1.0"
github "homebrew", "1.13.0"
github "hub", "1.4.1"
github "inifile", "1.4.1", :repo => "puppetlabs/puppetlabs-inifile"
github "nginx", "1.6.0"
github "nodejs", "5.0.0"
github "openssl", "1.0.0"
github "phantomjs", "3.0.0"
github "pkgconfig", "1.0.0"
github "repository", "2.4.1"
github "ruby", "8.5.3"
github "stdlib", "4.7.0", :repo => "puppetlabs/puppetlabs-stdlib"
github "sudo", "1.0.0"
github "xquartz", "1.2.1"
# Optional/custom modules. There are tons available at
# https://github.com/boxen.
# All machines
github "autoconf", "1.0.0"
github "defaultfolderx", "0.1.3", :repo => "toby-griffiths/puppet-defaultfolderx"
github "libpng", "1.0.0"
github "libtool", "1.0.0"
github "pcre", "1.0.0"
github "wget", "1.0.1"
# Browsers
github "chrome", "1.2.0"
github "firefox", "1.2.3"
# Web Development
github "php", "2.0.0"
github "phpstorm", "1.0.6"
github "python", "2.0.1"
github "sequel_pro", "1.0.1"
github "sourcetree", "1.0.0"
github "vagrant", "3.2.0"
github "virtualbox", "1.0.13"
# Other
github "adium", "1.4.0"
github "calibre", "3.1.0"
github "dropbox", "1.4.1"
github "evernote", "2.0.7"
github "googledrive", "1.0.2"
github "hipchat", "1.1.3"
github "hipchat", "1.1.3"
github "onepassword", "1.1.4"
github "osx", "2.8.0"
github "skype", "1.1.0"
github "thunderbird", "1.4.0"
github "vlc", "1.1.0"
github "elasticsearch", "2.8.0"
github "postgresql", "4.0.1"
github "mysql", "2.0.1"
github "redis", "3.1.0"
github "sysctl", "1.0.1"
require boxen::environment
require homebrew
require gcc
Exec {
group => 'staff',
logoutput => on_failure,
user => $boxen_user,
path => [
"${boxen::config::home}/rbenv/shims",
"${boxen::config::home}/rbenv/bin",
"${boxen::config::home}/rbenv/plugins/ruby-build/bin",
"${boxen::config::homebrewdir}/bin",
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin'
],
environment => [
"HOMEBREW_CACHE=${homebrew::config::cachedir}",
"HOME=/Users/${::boxen_user}"
]
}
File {
group => 'staff',
owner => $boxen_user
}
Package {
provider => homebrew,
require => Class['homebrew']
}
Repository {
provider => git,
extra => [
'--recurse-submodules'
],
require => File["${boxen::config::bindir}/boxen-git-credential"],
config => {
'credential.helper' => "${boxen::config::bindir}/boxen-git-credential"
}
}
Service {
provider => ghlaunchd
}
Homebrew::Formula <| |> -> Package <| |>
node default {
# core modules, needed for most things
include dnsmasq
include git
include hub
include nginx
# fail if FDE is not enabled
if $::root_encrypted == 'no' {
fail('Please enable full disk encryption and try again')
}
# node versions
# Set the global default node (auto-installs it if it can)
class { 'nodejs::global':
version => '0.12'
}
nodejs::version { '0.10': }
nodejs::version { '0.8': }
# default ruby versions
ruby::version { '1.9.3': }
ruby::version { '2.0.0': }
ruby::version { '2.1.7': }
ruby::version { '2.2.3': }
class { 'ruby::global':
version => '2.2.3'
}
# common, useful packages
package {
[
'ack',
'findutils',
'gnu-tar'
]:
}
file { "${boxen::config::srcdir}/our-boxen":
ensure => link,
target => $boxen::config::repodir
}
include cubicmushroom
}
class cubicmushroom::webdev {
# OSX Settings
include osx::safari::enable_developer_mode
# Browsers
include chrome::canary
# MySQL
include mysql
# Sequel Pro
include sequel_pro
# PHP & Composer
$php53 = '5.3.28'
php::fpm { $php53: }
php::extension::apc { "apc for ${php53}":
php => $php53,
}
php::extension::intl { "intl for ${php53}":
php => $php53,
version => '3.0.0'
}
cubicmushroom::php::memory { "Memory increase for PHP ${php53}":
php_version => $php53,
memory_limit => '1024M',
}
php::extension::xdebug { "xdebug for ${php53}":
php => $php53,
version => '2.2.6'
}
$php54 = '5.4.29'
php::fpm { $php54: }
php::extension::apc { "apc for ${php54}":
php => $php54,
}
php::extension::intl { "intl for ${php54}":
php => $php54,
version => '3.0.0'
}
cubicmushroom::php::memory { "Memory increase for PHP ${php54}":
php_version => $php54,
memory_limit => '2048M',
}
php::extension::xdebug { "xdebug for ${php54}":
php => $php54,
version => '2.2.6'
}
$php55 = '5.5.24'
php::fpm { $php55: }
php::extension::intl { "intl for ${php55}":
php => $php55,
version => '3.0.0'
}
cubicmushroom::php::memory { 'Memory increase for PHP ${php55}':
php_version => $php55,
memory_limit => '2048M',
}
php::extension::xdebug { "xdebug for ${php55}":
php => $php55,
version => '2.2.6'
}
cubicmushroom::php::ini { 'Disabled short tags':
php => $php55,
setting => 'short_open_tag',
value => 'off'
}
# Set global PHP version
class { 'php::global':
version => $php55
}
# Install Composer globally on your PATH
include php::composer
# Less.js (compiler)
npm_module { 'less for all versions':
module => 'less',
version => '~> 2.5.3',
node_version => '*',
}
# SoureTree
include sourcetree
# Vagrant
class { 'vagrant':
version => '1.7.1',
completion => true,
}
vagrant::plugin { 'vagrant-hostmaster': }
vagrant::plugin { 'vagrant-bindfs': }
# VirtualBox
class {'virtualbox':
version => '4.3.28',
patch_level => '100309',
}
# Ruby
ruby_gem { 'bundler for all rubies':
gem => 'bundler',
version => '~> 1.0',
ruby_version => '*',
}
ruby_gem { 'compass for all rubies':
gem => 'compass',
version => '~> 1.0',
ruby_version => '*',
}
ruby_gem { 'travis-lint for all rubies':
gem => 'travis-lint',
version => '~> 2.0',
ruby_version => '*',
}
# Lynx text browser
package { 'lynx':
ensure => present,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment