Skip to content

Instantly share code, notes, and snippets.

@gildas
gildas / gist:6438805
Created September 4, 2013 15:37
cannot convert DummyConfig to String
INFO warden: Calling action: #<Vagrant::Action::Builtin::Provision:0x000001022bf040>
ERROR warden: Error occurred: can't convert Vagrant::Config::V2::DummyConfig to String (Vagrant::Config::V2::DummyConfig#to_str gives Vagrant::Config::V2::DummyConfig)
@gildas
gildas / puppet_in_vagrantfile
Created September 4, 2013 15:41
Puppet in Vagrantfile
config.vm.provision :puppet do |puppet|
puppet.manifests_path = 'puppet/manifests'
puppet.manifest_file = 'site.pp'
puppet.module_path = 'puppet/modules'
end
curl -sSL https://raw.github.com/inin-apac/puppet-me/master/install/osx-client.sh | bash
@gildas
gildas / gist:70a4208f8da99639b66b
Created April 8, 2015 01:37
bundle exec vagrant box list error with vagrant-vmware-fusion loaded
[9438] $ VAGRANT_LOG=debug bundle exec vagrant box list
VMWare fusion gem is in /Library/Ruby/Gems/2.0.0/gems/vagrant-vmware-fusion-3.2.5
Your Gemfile lists the gem vagrant-vmware-fusion (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
VMWare fusion gem is in /Library/Ruby/Gems/2.0.0/gems/vagrant-vmware-fusion-3.2.5
VMWare fusion gem is in /Library/Ruby/Gems/2.0.0/gems/vagrant-vmware-fusion-3.2.5
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with `vagrant plugin`. Vagrant will autoload any plugins in
@gildas
gildas / vagrant
Created April 21, 2015 07:35
use real vagrant outside of gemset in shim
#!/usr/bin/env bash
set -e
[ -n "$RBENV_DEBUG" ] && set -x
program="${0##*/}"
if [ "$program" = "ruby" ]; then
for arg; do
case "$arg" in
-e* | -- ) break ;;
*/* )
@gildas
gildas / config-winrm.cmd
Last active August 29, 2015 14:20
Configure winrm for unix/mac winrm clients
setlocal EnableDelayedExpansion EnableExtensions
title Configuring Windows Remote Management...
cmd /c net stop winrm
cmd /c winrm quickconfig -q
cmd /c winrm quickconfig -transport:http
cmd /c winrm set winrm/config @{MaxTimeoutms="1800000"}
cmd /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"}
cmd /c winrm set winrm/config/service @{AllowUnencrypted="true"}
cmd /c winrm set winrm/config/service/auth @{Basic="true"}
@gildas
gildas / install-icserver.ps1
Last active August 29, 2015 14:20
Install IC Server (hangs in packer)
# IC Server Installation
#
#
<# # Documentation {{{
.Synopsis
Installs CIC
#> # }}}
[CmdletBinding()]
Param(
@gildas
gildas / gist:59eccaf78eaba5706336
Last active August 29, 2015 14:20
XML garbage with elevated powershell provisioner
2015/05/08 01:19:42 ui: ==> vmware-windows-iso: Provisioning with shell script: ./scripts/install-icserver.ps1
2015/05/08 01:19:42 packer-provisioner-powershell: 2015/05/08 01:19:42 Opening ./scripts/install-icserver.ps1 for reading
2015/05/08 01:19:42 packer-provisioner-powershell: 2015/05/08 01:19:42 Building elevated command wrapper for: $env:PACKER_BUILDER_TYPE="vmware-windows-iso"; $env:PACKER_BUILD_NAME="vmware-windows-iso"; c:/Windows/Temp/script.ps1
2015/05/08 01:19:42 packer-provisioner-powershell: 2015/05/08 01:19:42 Uploading elevated shell wrapper for command [$env:PACKER_BUILDER_TYPE="vmware-windows-iso"; $env:PACKER_BUILD_NAME="vmware-windows-iso"; c:/Windows/Temp/script.ps1] to [${env:TEMP}\packer-elevated-shell-554b909e-d465-c8eb-ca78-f5f3426d9561.ps1] from [/var/folders/z1/891cdmz97njf2q3w00kkv4b40000gn/T/packer-elevated-shell.ps1857974159]
2015/05/08 01:19:42 packer-provisioner-powershell: 2015/05/08 01:19:42 [INFO] 2590 bytes written for 'uploadData'
2015/05/08 01:19:42 [INFO] 25
@gildas
gildas / boxstarter-windows-iis
Last active November 19, 2015 03:35
Boxstarter script for Windows 2012R2 standard with IIS
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst -y classic-shell
cinst -y 7zip
cinst -y becyicongrabber
cinst -y ConEmu
cinst -y git
cinst -y ncftp
cinst -y TotalCommander
cinst -y vim
cinst -y webdeploy
@gildas
gildas / build.ps1
Created November 30, 2015 13:28
Build packer on Windows machines
[CmdletBinding()]
param(
[Parameter(Position=0, Mandatory=$true)]
[ValidateSet('386', 'amd64', 'arm')]
[string[]]$Arch=('386', 'amd64', 'arm'),
[Parameter(Position=1, Mandatory=$true)]
[ValidateSet('linux', 'darwin', 'windows', 'freesd', 'openbsd')]
[string[]]$OS=('linux', 'darwin', 'windows', 'freebsd', 'openbsd'),
[Parameter(Position=2, Mandatory=$false)]
[switch]$Deploy