Git Product home page Git Product logo

puppet-boxen's Introduction

Boxen

Build Status

The Boxen puppet module for... Boxen.

Required Modules for Boxen

Fundamental modules and types used by all of Boxen.

Usage

# We owe you examples. Sorry.

Facts

Boxen loads facts from following locations:

Facter itself also loads facts from environment variables with mask FACTER_* (weight 1_000_000).

Default values:

Configuration

Development

Write code. Run script/cibuild to test it. Check the script directory for other useful tools.

puppet-boxen's People

Contributors

blackjid avatar bleything avatar cofyc avatar dgoodlad avatar drewzar avatar fromonesrc avatar grosser avatar hirocaster avatar indirect avatar jacobbednarz avatar jbarnette avatar jhaals avatar mattheath avatar mikemcquaid avatar n0ts avatar phinze avatar radeksimko avatar rafaelfranca avatar rodjek avatar rvora avatar salimane avatar seanknox avatar skalnik avatar sprickly avatar tarebyte avatar tedkulp avatar timtim123456 avatar tommeier avatar wfarr avatar ymendel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-boxen's Issues

env.sh failing when using boxen-web to run

I am having trouble running the env.sh script after boxen has been run through the boxen-web package.

I noticed that the boxen-web script is curl-ing my boxen repo as a tarball and not checking out (obviously because it cannot be assumed that git is installed yet to be able to clone).

I see this line of code at the end of the env.sh template:

export BOXEN_SETUP_VERSION=`GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD`

which looks like it is setting the git revision of the repo. This is not working as the /opt/boxen/repo dir has been created from the tarball and not cloned.

I can't seem to find anyone else with this problem so I wonder if I am doing something wrong, or should this last line in the template be different when there is no .git folder in /opt/boxen/repo?

I cant get to my computer to pickup the exact error at the moment so when I get a chance I will add the exact error output if its required...

boxen::osx_defaults doesn't allow an empty string value

With this manifest:

class osx::safari::homepage($page) {
  boxen::osx_defaults { 'Set the Default Safari Homepage':
    user   => $::boxen_user,
    domain => 'com.apple.Safari',
    key    => 'HomePage',
    value  => $page,
  }
}

class { 'osx::safari::homepage': page => "" }

I get this error:


Error: Cannot ensure present without domain, key, and value attributes at /opt/boxen/repo/shared/boxen/manifests/osx_defaults.pp:23 on node kogarashi.local
Error: Cannot ensure present without domain, key, and value attributes at /opt/boxen/repo/shared/boxen/manifests/osx_defaults.pp:23 on node kogarashi.local

😿

puppet librarian failing to resolve mysql

[Librarian] Resolving mysql (= 1.99.6) <boxen/puppet-mysql>
[Librarian]   No known prior constraints
[Librarian]   Checking manifests
[Librarian]     Checking mysql/1.2.0 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.2.0 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.5 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.5 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.4 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.4 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.3 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.3 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.2 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.2 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.1 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.1 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.1.0 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.1.0 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.0.1 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.0.1 <boxen/puppet-mysql>
[Librarian]     Checking mysql/1.0.0 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/1.0.0 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.2.4 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.2.4 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.2.3 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.2.3 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.2.2 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.2.2 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.2.1 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.2.1 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.2.0 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.2.0 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.1.0 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.1.0 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.0.2 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.0.2 <boxen/puppet-mysql>
[Librarian]     Checking mysql/0.0.1 <boxen/puppet-mysql>
[Librarian]       Backtracking from mysql/0.0.1 <boxen/puppet-mysql>
[Librarian]   Failed to resolve mysql (= 1.99.6) <boxen/puppet-mysql>
Could not resolve the dependencies.

Extending project.pp

Great work on Boxen, makes my life a breeze.
I would however like to create some things that are unique to our company especially to the project.pp. Is there a 'right' way of doing this, that you have in mind when modding boxen modules or should I just fork boxen and keep my version up to date by pulling upstream changes in?

Use puppetlabs/puppet#3341 instead of ripienaar/puppet-module-data ?

I've been having boxen testing problems today because of this module's dependency on ripienaar/puppet-module-data; these have become boxen/puppet-template#27 and boxen/cardboard#13

I saw from ripienaar/puppet-module-data#2 -> https://tickets.puppetlabs.com/browse/PUP-1640 that puppetlabs/puppet#3341 has merged that functionality into mainline puppet. So maybe this module should use that now and avoid these weird external dependency problems?

It doesn't look like that is an option immediately, but I thought I'd open this issue to track it anyway.

Cheers 🍻

Cannot install app after changing homebrew_root to '/usr/local'

FYI, I can install via the command brew cask install caffeine --appdir=/Applications"

$ ll
total 46
drwxrwxr-x+ 93 root  admin   3.1K Jan  5 19:32 Applications
...

Puppetfile

# 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 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.10.1"

# Support for default hiera data in modules

github "module_data", "0.0.3", :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.4"
github "dnsmasq",     "2.0.1"
github "foreman",     "1.2.0"
github "gcc",         "2.2.0"
github "git",         "2.7.1"
github "go",          "2.1.0"
github "homebrew",    "1.11.2"
github "hub",         "1.3.0"
github "inifile",     "1.1.1", :repo => "puppetlabs/puppetlabs-inifile"
github "nginx",       "1.4.4"
github "nodejs",      "4.0.0"
github "openssl",     "1.0.0"
github "phantomjs",   "2.3.0"
github "pkgconfig",   "1.0.0"
github "repository",  "2.3.0"
github "ruby",        "8.1.7"
github "stdlib",      "4.2.1", :repo => "puppetlabs/puppetlabs-stdlib"
github "sudo",        "1.0.0"
github "xquartz",     "1.2.1"

Error

Error: Execution of 'brew cask install caffeine --appdir=/Applications' returned 1: /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log/destinations.rb:94:in `flush': Bad file descriptor (Errno::EBADF)
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log/destinations.rb:94:in `handle'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:170:in `block in newmessage'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:169:in `each'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:169:in `newmessage'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:266:in `initialize'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:84:in `new'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:84:in `create'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:8:in `send_log'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:15:in `block (2 levels) in <module:Logging>'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:27:in `log_exception'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:272:in `rescue in block in execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:246:in `block in execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:297:in `call'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:297:in `block in safe_posix_fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:290:in `fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:290:in `safe_posix_fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:237:in `execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:182:in `execute'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/provider.rb:115:in `execute'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:63:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:229:in `block in with_clean_env'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:216:in `with_original_env'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:222:in `with_clean_env'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:62:in `execute'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:54:in `run'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:41:in `install'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/type/package.rb:73:in `block (3 levels) in <module:Puppet>'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:197:in `call_valuemethod'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:498:in `set'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:581:in `sync'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:204:in `sync'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:128:in `sync_if_needed'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:81:in `perform_changes'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:20:in `evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:204:in `apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:217:in `eval_resource'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `call'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:327:in `block in thinmark'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:326:in `thinmark'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `block in evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:138:in `evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/resource/catalog.rb:169:in `block in apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:149:in `with_destination'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/report.rb:112:in `as_logging_destination'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/resource/catalog.rb:168:in `apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:118:in `block in apply_catalog'
    from /opt/boxen/repo/shared/boxen/lib/puppet/provider/package/hax.rb:12:in `benchmark'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:117:in `apply_catalog'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:222:in `run_internal'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:132:in `block in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/context.rb:64:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet.rb:244:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:131:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:297:in `apply_catalog'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:231:in `block in main'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/context.rb:64:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet.rb:244:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:193:in `main'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:154:in `run_command'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `block (2 levels) in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:510:in `plugin_hook'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `block in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:488:in `exit_on_fail'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/command_line.rb:146:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/command_line.rb:92:in `execute'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/bin/puppet:8:in `<top (required)>'
    from /opt/boxen/repo/bin/puppet:16:in `load'
    from /opt/boxen/repo/bin/puppet:16:in `<main>'
Error: /Stage[main]/Boxen::Personal/Package[caffeine]/ensure: change from absent to present failed: Execution of 'brew cask install caffeine --appdir=/Applications' returned 1: /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log/destinations.rb:94:in `flush': Bad file descriptor (Errno::EBADF)
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log/destinations.rb:94:in `handle'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:170:in `block in newmessage'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:169:in `each'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:169:in `newmessage'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:266:in `initialize'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:84:in `new'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:84:in `create'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:8:in `send_log'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:15:in `block (2 levels) in <module:Logging>'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/logging.rb:27:in `log_exception'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:272:in `rescue in block in execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:246:in `block in execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:297:in `call'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:297:in `block in safe_posix_fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:290:in `fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:290:in `safe_posix_fork'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:237:in `execute_posix'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/execution.rb:182:in `execute'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/provider.rb:115:in `execute'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:63:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:229:in `block in with_clean_env'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:216:in `with_original_env'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:222:in `with_clean_env'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:62:in `execute'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:54:in `run'
    from /opt/boxen/repo/shared/brewcask/lib/puppet/provider/package/brewcask.rb:41:in `install'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/type/package.rb:73:in `block (3 levels) in <module:Puppet>'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:197:in `call_valuemethod'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:498:in `set'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/property.rb:581:in `sync'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:204:in `sync'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:128:in `sync_if_needed'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:81:in `perform_changes'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/resource_harness.rb:20:in `evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:204:in `apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:217:in `eval_resource'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `call'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `block (2 levels) in evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:327:in `block in thinmark'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:326:in `thinmark'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:147:in `block in evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction.rb:138:in `evaluate'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/resource/catalog.rb:169:in `block in apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/log.rb:149:in `with_destination'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/transaction/report.rb:112:in `as_logging_destination'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/resource/catalog.rb:168:in `apply'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:118:in `block in apply_catalog'
    from /opt/boxen/repo/shared/boxen/lib/puppet/provider/package/hax.rb:12:in `benchmark'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:117:in `apply_catalog'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:222:in `run_internal'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:132:in `block in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/context.rb:64:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet.rb:244:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/configurer.rb:131:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:297:in `apply_catalog'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:231:in `block in main'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/context.rb:64:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet.rb:244:in `override'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:193:in `main'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application/apply.rb:154:in `run_command'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `block (2 levels) in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:510:in `plugin_hook'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `block in run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util.rb:488:in `exit_on_fail'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/application.rb:384:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/command_line.rb:146:in `run'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/lib/puppet/util/command_line.rb:92:in `execute'
    from /opt/boxen/repo/.bundle/ruby/2.0.0/gems/puppet-3.7.1/bin/puppet:8:in `<top (required)>'
    from /opt/boxen/repo/bin/puppet:16:in `load'
    from /opt/boxen/repo/bin/puppet:16:in `<main>'

compressed_app can't unzip resource forks

The compressed_app provider uses the unzip command, which doesn't understand the __MACOSX directory containing resource fork data that is created by e.g. the Finder. The provider needs to use ditto -xk <zipfile> <destinationdir> instead.

Error in `osx_defaults.pp` when using future parser

I wanted to give the puppet future parser a try (my use case was using puppet heredoc in manifests).

When I run script/boxen --future-parser --noop I get the following error:

Error: Evaluation Error: No matching entry for selector parameter with value 'true' at /opt/boxen/repo/shared/boxen/manifests/osx_defaults.pp:29:23 on node etosha.local

I couldn't figure out yet what’s wrong with the following lines:

      if (($type == undef) and (($value == true) or ($value == false))) or ($type =~ /^bool/) {
        $type_ = 'bool'

        $checkvalue = $value ? {
          /(true|yes)/ => '1',
          /(false|no)/ => '0',
        }

My puppet version is 3.7.5 and my puppet-boxen version is 3.10.4.

What is BOXEN_SETUP_VERSION used for?

I'm trying to speed up my zsh load times and I figured out that I can shave off a good 200ms on my computer by removing the following line from env.sh:

export BOXEN_SETUP_VERSION=`GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD`

I've looked around on GitHub and in this codebase and I can't figure out why this variable even exists. Is it used for anything in particular?

My guess at this point is that it's a simple debug variable. If that's the case, wouldn't it be better to rewrite this into lazy function?

Say something along these lines:

BOXEN_SETUP_VERSION() { echo `GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD` }

Would it be better to move project manifests outside of Boxen?

I think I have a pretty good understanding of how project manifests work but, while it's useful to reuse project.pp, would it be better to store the actual project manifests outside of Boxen, e.g., in the project repository?

Unless I'm missing something, this would make project management easier because project manifests can be shared across organisations.

I've already done something similar by creating my own module for my people manifest so I can reuse this across organisations using Boxen.

In practice you could include a module within the project repository and created a shared module for any reusable manifests.

Would be good to get some opinions on this kind of approach.

Homebrew and Caskroom package names collide

I'm using Boxen to manage a list of Homebrew (and Caskroom). Since they have separate namespaces, both of them offer a package named handbrake. In Homebrew, that package is a command-line tool, and in Caskroom, that package is a GUI .app package that goes in /Applications.

Unfortunately, Boxen creates both types of packages in a single namespace, and Puppet doesn't allow two packages with the same name.

Here's the output from running boxen:

$ script/boxen
--> Preparing to auto-update...
--> Complete! Nothing new from upstream.
Error: Duplicate declaration: Package[handbrake] is already declared; cannot redeclare at /opt/boxen/repo/shared/boxen/manifests/personal.pp:91 on node finn.local
Error: Duplicate declaration: Package[handbrake] is already declared; cannot redeclare at /opt/boxen/repo/shared/boxen/manifests/personal.pp:91 on node finn.local

Here's an example Hiera file to recreate the problem:

# /opt/boxen/repo/hiera/users/indirect.yaml
---
boxen::personal::homebrew_packages:
  - handbrake

boxen::personal::osx_apps:
  - handbrake

Bring in MAS support for Boxen

Installing packages from the app store is not currently supported by Boxen however there are modules like @indirect's puppet-mas that should be a first class citizen and get core support since it's quite popular.

relative_bin.sh on PATH causes problems because of a relative dir in PaTH

Many of you have probably already had this discussion already and made a conscious decision to do this, but I do not understand why the decision was made, and would like to get guidance on how best to make this work across the board for our development environment.

We are observing that when using boxen the relative directory "bin" is prepended to my PATH. This causes challenges for us, because:

  • we put some software already in $HOME/bin that is relative to our environment

This is problematic because the results from a PATH lookup are cached in shells. For a quick example, create a new file in ~/bin, called test_relative_path with the following contents:

#!/usr/bin/env bash
echo "it works!"

set the executable bit on this file, and then open up a new shell in Terminal, and you will
observe the following:

[huckphin@MBAir ~]$ test_relative_path 
it works!
[huckphin@MBAir ~]$ which test_relative_path
bin/test_relative_path
[huckphin@MBAir ~]$ cd /tmp
[huckphin@MBAir tmp]$ test_relative_path 
-bash: bin/test_relative_path: No such file or directory

It cannot find the file that was found because Boxen prepends the relative path, and the first one found
is cached. The file that prepends the relative directory to the PATH is found in this file: https://github.com/boxen/puppet-boxen/blob/master/files/relative_bin_on_path.sh

Is there a better way that this problem can be solved so that a relative directory is not added to our PATH? I would like to submit a PR that will change it to include $HOME/bin instead of bin, but I would like to open it up for a discussion to see I can understand what problem this was trying to solve.

I know that you can override this default behavior by adding the following in your bashrc:

shopt -s checkhash

but it seems a little weird to have the users be forced to set this option if they want to run Boxen.

Can't run Puppet, fetching dependencies with librarian failed

Been having problems since updated to Mavericks:

...
[Librarian]     Checking boxen/0.0.1.1 <boxen/puppet-boxen>
[Librarian]       Backtracking from boxen/0.0.1.1 <boxen/puppet-boxen>
[Librarian]     Checking boxen/0.0.1 <boxen/puppet-boxen>
[Librarian]       Backtracking from boxen/0.0.1 <boxen/puppet-boxen>
[Librarian]   Failed to resolve boxen (= 3.0.2) <boxen/puppet-boxen>
Could not resolve the dependencies.
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/action/resolve.rb:27:in `run'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:161:in `resolve!'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/librarian-puppet-0.9.9/lib/librarian/puppet/cli.rb:63:in `install'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/librarian-puppet-0.9.9/vendor/librarian/lib/librarian/cli.rb:29:in `bin!'
/opt/boxen/repo/.bundle/ruby/2.0.0/gems/librarian-puppet-0.9.9/bin/librarian-puppet:9:in `<top (required)>'
/opt/boxen/repo/bin/librarian-puppet:16:in `load'
/opt/boxen/repo/bin/librarian-puppet:16:in `<main>'
Can't run Puppet, fetching dependencies with librarian failed.

Couldn't fit all the debug in but basically Librarian seems to backtrack everything and die. Any ideas?

Allow homebrew to be installed in it's default location of /usr/local

(Not sure which repo to make this issue in. It seems hardcoded in this modules so I hope this is right)

It'd be nice to be able to run homebrew out of it's default location of /usr/local. Right now, as I understand the code, it looks pretty hardcoded: $homebrewdir = "${home}/homebrew". I understand wanting to not overtake an existing homebrew install (from reading through boxen/puppet-homebrew#8) but it seems like there are a lot of hoops to jump through as a result.

Regardless, are there any plans for this?

Enable dragging on the trackpad

Hi,

I would like to turn on dragging on the trackpad. The following command do task properly:

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Dragging -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 2
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 2

I try the following in boxen to achieve the same result, but it doesn't work.

boxen::osx_defaults { 'Enable dragging on a Magic Trackpad':
    user   => $::luser,
    domain => 'com.apple.driver.AppleBluetoothMultitouch.trackpad',
    key    => 'Dragging',
    type   => 'bool',
    value  => true,
  }

  boxen::osx_defaults { 'Enable dragging for the active user':
    user   => $::luser,
    host   => 'currentHost',
    domain => 'NSGlobalDomain',
    key    => 'com.apple.mouse.tapBehavior',
    type   => 'int',
    value  => 2,
  }

  boxen::osx_defaults { 'Enable dragging on the login screen':
    user   => $::luser,
    domain => 'NSGlobalDomain',
    key    => 'com.apple.mouse.tapBehavior',
    type   => 'int',
    value  => 2,
  }

Does anybody have an idea why it is not working? Or even better: is there a way to make boxen to log the commands that it uses (globally or only for one class)?

BR,
Felhő

Provider PKG support

  package { 'SkyDrive':
     source => 'http://wl.dlservice.microsoft.com/download/1/A/5/1A5C4419-BF0B-42BB-BCAA-F79CFD26044A/SkyDrive.pkg',
     provider => pkg,
   }
Error: /Stage[main]/People::Cdenneen::Applications/Package[SkyDrive]: Provider pkg is not functional on this host

Tried pkgdmg as well but errors

Error: Execution of '/usr/sbin/installer -pkg /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/d20130408-85792-1aqewb9/SkyDrive -target /' returned 1: installer: Error the package path specified was invalid: '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/d20130408-85792-1aqewb9/SkyDrive'.

Error: /Stage[main]/People::Cdenneen::Applications/Package[SkyDrive]/ensure: change from absent to present failed: Execution of '/usr/sbin/installer -pkg /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/d20130408-85792-1aqewb9/SkyDrive -target /' returned 1: installer: Error the package path specified was invalid: '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/d20130408-85792-1aqewb9/SkyDrive'.

Unless value doesnt work

If you run a standard boxen run from latest version of our-boxen, the following command will always run:

/Stage[main]/Boxen::Security/Boxen::Osx_defaults[require password at screensaver]/Exec[osx_defaults write  com.apple.screensaver:askForPassword=>true]/returns: executed successfully

So it looks like the unless command isnt working.

Thinking about using PlistBuddy to check the value instead (from a quick read of http://ilostmynotes.blogspot.co.uk/2011/09/reading-and-modifying-os-x-plist-files.html)

Pattern for removing things? (ensure: absent)

This could be satisfied with document:

I have been reading the source for the boxen modules, and I haven't found one (yet) where there is provision for removing a package.

E.g., your project asks for TextMate but decides to cut over to Sublime, and would like to remove the clutter by removing applications that may have been provisioned once but no longer make any sense.

This also gets into versioning questions: Team provisions PostgreSQL 9.1.4 but needs to move to 9.2 to match production systems. Not clear how/whether boxen helps with that.

Setting dictionary values with boxen::osx_defaults is getting quoted incorrectly

Given the following:

boxen::osx_defaults { 'Disable internet sharing':
  ensure => present,
  domain => '/Library/Preferences/SystemConfiguration/com.apple.nat',
  key    => 'NAT',
  value  => 'Enabled 0'
  type   => 'dict',
}

The desired output to run the command with defaults is:

/usr/bin/defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict Enabled 0

boxen::osx_defaults will exec the following, though (note the quoted value of Enabled 0):

/usr/bin/defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict "Enabled 0"

which gives an error of:

Notice: /Stage[main]/Profiles::Mac::Security/Boxen::Osx_defaults[Disable internet sharing]/Exec[osx_defaults write  /Library/Preferences/SystemConfiguration/com.apple.nat:NAT=>Enabled 0]/returns: 2014-05-20 11:19:24.397 defaults[29867:c07] Key Enabled 0 lacks a corresponding value
Error: /usr/bin/defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict "Enabled 0" returned 1 instead of one of [0]
Error: /Stage[main]/Profiles::Mac::Security/Boxen::Osx_defaults[Disable internet sharing]/Exec[osx_defaults write  /Library/Preferences/SystemConfiguration/com.apple.nat:NAT=>Enabled 0]/returns: change from notrun to 0 failed: /usr/bin/defaults write /Library/Preferences/SystemConfiguration/com.apple.nat NAT -dict "Enabled 0" returned 1 instead of one of [0]

The issue is most likely with shellquote() in this line --> https://github.com/boxen/puppet-boxen/blob/master/manifests/osx_defaults.pp#L41

Just wondering if anyone has worked around this?

Sourcing env.sh from Fish Shell

I was trying Fish Shell, sourcing the /opt/boxen/env.sh give this error:

fish: Could not locate end of block. The 'end' command is missing, misspelled or a ';' is missing.
/opt/boxen/env.sh (line 34): if [ -d "$BOXEN_HOME/repo/.git" ]; then

My env.sh

#!/bin/bash

# Automatically generated by Boxen. Don't edit directly. This file
# sets up paths and basic environment for the Boxen dev environment,
# and is intended to be sourced in your shell profile.

set +e
set +u

# Make the root of Boxen available.

export BOXEN_HOME=/opt/boxen

# Add homebrew'd stuff to the path.

PATH=$BOXEN_HOME/homebrew/bin:$BOXEN_HOME/homebrew/sbin:$PATH

# Add homebrew'd stuff to the manpath.

export MANPATH=$BOXEN_HOME/homebrew/share/man:$MANPATH

# Add any binaries specific to Boxen to the path.

PATH=$BOXEN_HOME/bin:$PATH

for f in $BOXEN_HOME/env.d/*.sh ; do
  if [ -f $f ] ; then
    source $f
  fi
done

# Boxen is active.

if [ -d "$BOXEN_HOME/repo/.git" ]; then
  export BOXEN_SETUP_VERSION=`GIT_DIR=$BOXEN_HOME/repo/.git git rev-parse --short HEAD`
else
  echo "Boxen could not load properly!"
fi

Unfortunately I don't know enough bash/fish to correct the issue, any suggestions?

Duplicate declaration

Error: Duplicate declaration: File[undef] is already declared in file /opt/boxen/repo/shared/boxen/manifests/config.pp:51; cannot redeclare at /opt/boxen/repo/shared/boxen/manifests/config.pp:51 on node redacted.local

Updated puppet-boxen, ran boxen and encountered this error.

./script/cibuild is not working

Ruby 2.1.2 + ./script/cibuild is not working.
It is puppet version 3.4 issue.
https://tickets.puppetlabs.com/browse/PUP-1243

Other boxen module is not included 'puppet' in Gemfile.
Why puppet-boxen module is need 'puppet' in Gemfile?

puppet-template is not included 'puppet' in Gemfile.
https://github.com/boxen/puppet-template/blob/master/Gemfile

./script/cibuild
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Using json 1.8.1
Installing multipart-post 2.0.0
Installing ansi 1.4.3
Installing thor 0.18.1
Installing addressable 2.3.5
Installing rake 10.1.1
Installing json_pure 1.8.1
Installing highline 1.6.20
Installing metaclass 0.0.2
Using bundler 1.6.2
Installing puppet-lint 0.3.2
Installing facter 1.7.4
Installing diff-lcs 1.2.5
Installing rgen 0.6.6
Installing rspec-mocks 2.14.5
Installing rspec-core 2.14.7
Installing faraday 0.9.0
Installing librarian-puppet 0.9.10
Installing hiera 1.3.0
Installing mocha 1.0.0
Installing rspec-expectations 2.14.5
Installing sawyer 0.5.3
Installing rspec 2.14.1
Installing octokit 2.3.1
Installing rspec-puppet 1.0.1
Installing puppetlabs_spec_helper 0.4.1
Installing puppet 3.3.2
Installing boxen 2.3.0
Installing cardboard 2.1.0
Your bundle is complete!
It was installed into ./.bundle
.bundle/ruby/2.1.0/gems/puppet-3.3.2/lib/puppet/util/autoload.rb:68:in `rescue in load_file': Could not autoload puppet/type/component: can't modify frozen Symbol (Puppet::Error)

Regards

Support for Mavericks

Upgrading to Mavericks currently breaks boxen:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /opt/boxen/repo/.bundle/ruby/2.0.0/gems/json-1.8.0 for inspection.
Results logged to /opt/boxen/repo/.bundle/ruby/2.0.0/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.0'` succeeds before bundling.
Can't bootstrap, dependencies are outdated.

Hiera config not being merged

I'm trying to define some homebrew_packages and osx_apps in my user hiera and my common hiera, but I cannot get that working.

# hiera/common.yaml
boxen::personal::osx_apps:
  - google-chrome
  - hipchat
# hiera/users/blackjid.yaml
boxen::personal::osx_apps:
  - vlc
# config/hiera.yaml
:backends:
  - yaml
:yaml:
  :datadir: "%{::boxen_home}/repo/hiera"
:hierarchy:
  - "users/%{github_login}"
  - common

:merge_behavior: deeper

this is my configuration.... and the results are that only osx_apps defined in the users/blackjid.yaml are getting installed, in this case vlc, apps from common.yml are ignored.

What I have found is that if I don't add the boxen::personal::osx_apps: key in the user file, the common file apps are installed.

I also tried with project and the problem is the same.

It totally looks that the keys common.yml are not being merged with the keys in users/<username>.yml, they are being replaced.

Other test I did was to swap the hierarchy values in the hiera.yaml, when I did it, the behavior was the other way around, now the keys in the users config are being replaced by the ones in the common.

Launchd overrides.plist doesn't exist on Yosemite

The launchd overrides.plist used by the ghlaunchd service provider in https://github.com/boxen/puppet-boxen/blob/master/lib/puppet/provider/service/ghlaunchd.rb#L85-L91 no longer exists in OS X 10.10. The same data can be acquired in a different format, though:

launchctl print system/dev.mysql

dev.mysql = {
    active count = 1
    path = /Library/LaunchDaemons/dev.mysql.plist
    state = running

    program = /opt/boxen/homebrew/bin/mysqld_safe
    arguments = {
        /opt/boxen/homebrew/bin/mysqld_safe
        --defaults-file=/opt/boxen/config/mysql/my.cnf
    }

    working directory = /opt/boxen/data/mysql

    stdout path = /opt/boxen/log/mysql/console.log
    stderr path = /opt/boxen/log/mysql/console.log
    global environment = {
        PATH => /usr/bin:/bin:/usr/sbin:/sbin
    }

    environment = {
        XPC_SERVICE_NAME => dev.mysql
    }

    domain = com.apple.xpc.launchd.domain.system
    username = dgoodlad

    minimum runtime = 10
    exit timeout = 1
    runs = 2
    successive crashes = 0
    excessive crashing = 0
    pid = 24784
    immediate reason = inefficient
    forks = 51
    execs = 1
    trampolined = 1
    last exit code = 1

    event triggers = {
    }

    endpoints = {
    }

    dynamic endpoints = {
    }

    pid-local endpoints = {
    }

    instance-specific endpoints = {
    }

    event channels = {
    }

    sockets = {
    }

    spawn type = daemon

    properties = {
        partial import = 1
        launchd bundle = 0
        xpc bundle = 0
        keepalive = 1
        runatload = 1
        dirty at shutdown = 0
        low priority i/o = 0
        low priority background i/o = 0
        legacy timer behavior = 0
        exception handler = 0
        multiple instances = 0
        supports transactions = 0
        supports pressured exit = 0
        enter kdp before kill = 0
        wait for debugger = 0
        app = 0
        system app = 0
        creates session = 0
        inetd-compatible = 0
        inetd listener = 0
        abandon process group = 0
        one-shot = 0
        requires reap = 0
        event monitor = 0
        penalty box = 0
        pended non-demand spawn = 0
        role account = 0
        launch only once = 0
        system support = 0
        app-like = 0
        inferred program = 1
        joins gui session = 0
        joins host session = 0
        parameterized sandbox = 0
        resolve program = 0
        abandon coalition = 0
        extension = 0
        nano allocator = 0
        no initgroups = 0
    }
}

Options aren't respected when running `boxen-upgrade`

So I started with this manifest:

  package { 'casperjs': }

Running boxen installed Casper 1.0.2.

Later, I changed the manifest to this:

  package { 'casperjs':
    install_options => ['--devel'],
    ensure          => '1.1-beta1'
  }

Casperjs version 1.1-beta1 is only available if you pass the --devel flag to brew install or brew upgrade.

When running boxen, it did not pass that flag, and so homebrew refused to install the version that was already installed:

$ boxen
Boxen's master branch is out of sync, won't auto-update!
Notice: Package[casperjs](provider=homebrew): Updating homebrew formulas
Error: Could not update: Execution of 'brew boxen-upgrade casperjs' returned 1: Error: casperjs-1.0.2 already installed

Error: /Stage[main]/People::Indirect/Package[casperjs]/ensure: change from 1.0.2 to 1.1-beta1 failed: Could not update: Execution of 'brew boxen-upgrade casperjs' returned 1: Error: casperjs-1.0.2 already installed

I manually passed the flag, and it worked fine:

$ brew boxen-upgrade casperjs --devel                                                                                                                                                                                                                                                             
==> Upgrading 1 outdated package, with result:
casperjs 1
==> Upgrading casperjs
==> Downloading https://github.com/n1k0/casperjs/archive/1.1-beta1.tar.gz
######################################################################## 100.0%
:beer:  /opt/boxen/homebrew/Cellar/casperjs/1: 244 files, 1.8M, built in 4 seconds

Looks like this happens because the upgrade command doesn't respect options, but there's no way to force an install short of manually uninstalling the homebrew package before running boxen that I can see.

Add dotfiles support to Boxen

I see #126 has taken a pass at this however I feel it is too much of a heavy handed solution because of the various ways people manage their dotfiles. I'd like to propose the following instead (based off @wfarr's comments in boxen/our-boxen#103 (comment)).

$home = "/Users/${::boxen_user}"
$dotfiles_dir = "${boxen::config::srcdir}/dotfiles"
$repository = hiera('boxen::personal::dotfiles::repository')
$command = hiera('boxen::personal::dotfiles::command')

repository { $dotfiles_dir:
  source => "${repository}"
}

exec { "install dotfiles":
  cwd      => $dotfiles_dir,
  command  => "./install.sh",
  provider => shell,
  creates  => $dotfiles_dir,
  require  => Repository[$dotfiles_dir]
}

Then via boxen::personal::dotfiles expose the repository and command properties which will allow people to manage their dotfiles via Boxen. The plan here is that we don't make this specific to a particular way of managing these files but create an entry point (the command property in this case) where they can insert a script which will manage the setup/linking/etc.

appdmg_eula provider uses insecure curl option, fails

The appdmg_eula provider was calls curl with -k which allows curl'ing over insecure HTTPS connections. I can't see why this would ever be desired, and one package (boxen/puppet-gpgtools) often fails when attempting to download an .dmg from their server. PR to fix this is here: #109

Is Boxen managing the gemrc necessary?

I have a more complex .gemrc than what Boxen provides, but obviously when I try and do anything with it, Puppet throws an error.

Considering the only thing in it is --no-doc --no-ri it seems as though this is convenience and not absolutely necessary.

What options do we have for those who would like to override what Boxen provides?

Compressed App provider could better use the HTTP Protocol

I've noticed that the Compressed App provider checks what it has to download by only looking at the file extension. In my opinion it should indeed better use the HTTP headers the server sends back and only rely on the file extension as a fallback.
Why this change you would ask?
There are some app providers that do not provide a direct link to the compressed file, they do send a Content-Disposition: attachment; filename="App.zip" indeed.
Also, I think the script should follow HTTP redirects.

While I'm not a ruby developer, I would love someone taking care of this issue.

OSX_Defaults

Support Array/Hash key/value updating.

Currently you cannot maintain:

com.apple.dock persistent-apps or persistent-others through this.

Using array-add will create the shortcuts on the dock every run. If you want to maintain the hash it would make it so you have to maintain the entire dock or that entire key.

I don't mind having additional folders show up in persistent-others like when you spin up a new Virtual Machine and Fusion or Parallels creates a shortcut to the Programs Folders for those VM's but I do want to have control over the presence of some of these.

Probably something for @glarizza ?

Had to hard reset on /opt/boxen/homebrew

Notice: Package[boxen/brews/gcc48](provider=homebrew): Updating homebrew formulas
Error: Could not update: Execution of 'brew update' returned 1: error: unable to unlink old 'Library/Homebrew/hooks/bottles.rb' (Permission denied)
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Wrapped exception:
Execution of 'brew update' returned 1: error: unable to unlink old 'Library/Homebrew/hooks/bottles.rb' (Permission denied)
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Error: /Stage[main]/Gcc/Package[boxen/brews/gcc48]/ensure: change from 4.8.3-boxen1 to 4.8.3-boxen2 failed: Could not update: Execution of 'brew update' returned 1: error: unable to unlink old 'Library/Homebrew/hooks/bottles.rb' (Permission denied)
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

Error: Could not remove existing file

I receive the following notice and errors when I run boxen:

Notice: /Stage[main]//Node[default]/File[/Users/dmarr/src/our-boxen]: Not removing directory; use 'force' to override
Notice: /Stage[main]//Node[default]/File[/Users/dmarr/src/our-boxen]: Not removing directory; use 'force' to override
Error: Could not remove existing file
Error: /Stage[main]//Node[default]/File[/Users/dmarr/src/our-boxen]/ensure: change from directory to link failed: Could not remove existing file

This happens when I run from /opt/boxen/bin/boxen and also from $HOME/src/our-boxen/script. The /opt repo doesn't know about ~/src AFAIK, so what is the cause of this message?

Thanks

Support non-github.com clone URLs in repo.pp

We've got a gh:e installation at work, and while I've been able to get away with using a fork of puppet-boxen containing a different clone url on repo.pp:2, it'd be nice if the we had more flexibility with where we're pulling boxen from in general.

I imagine we'd need to surface a variable like config.repohost in boxen's config.rb before being able to make changes to repo.pp -- does this sound right?

upstream remotes on boxen::projects

It would be nice to be able to add an upstream source for a project. This way forked projects could be made with their source repo already setup as a remote.

With what puppet-repository allows us to do, it would require defining some config options on the repository type:

repository { $repo_dir:
  source => $source,
  config => {
    "remote.upstream.url"   => $upstream_source,
    "remote.upstream.fetch" => "+refs/heads/*:refs/remotes/upstream/*"
  }
}

You would need some if logic in there for when $upstream_source is undefined, but I don't feel confident enough in my puppet knowledge to do that in a DRY way.

osx_defaults boolean matching

Hi.

I noticed that the boolean fields i set using osx_defaults gets added during every puppetrun.

Example:

  boxen::osx_defaults { 'disable_open_app_warnings':
    domain => 'com.apple.LaunchServices',
    key    => LSQuarantine,
    type   => bool,
    value  => true,
    user   => $::boxen_user
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.