Skip to content

Instantly share code, notes, and snippets.


Antek Baranski Sauraus

  • Vid Inc
  • Los Angeles, CA
Block or report user

Report or block Sauraus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Sauraus / gist:5977921
Created Jul 11, 2013
Example Multi OS & Multi guest VagrantFile
View gist:5977921
Vagrant.require_plugin "vagrant-windows"
win2k8_servers = {
:www => {
:hostname => "www",
:rdp_port => 3390,
:winrm_port => 5986
:api => {
:hostname => "api",
View gist:6025735
if provider
# Verify that the given provider matches what the box has.
if box_provider.to_sym != provider
@logger.error("Added box provider doesnt match expected: #{box_provider}")
raise Errors::BoxProviderDoesntMatch, :expected => provider, :actual => box_provider
# We weren't given a provider, so store this one.
provider = box_provider.to_sym
Sauraus / Autounattend.xml
Last active Nov 24, 2016
Veewee - Windows 2008R2 SP1 VL - WebServer setup
View Autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="" xmlns:xsi="">
<Disk wcm:action="add">
<CreatePartition wcm:action="add">
Sauraus / gist:6127168
Created Jul 31, 2013
How to add version attribute here?
View gist:6127168
pkgs.flatten.each do |pkg|
r = package pkg do
action( node['build_essential']['compiletime'] ? :nothing : :install )
r.run_action(:install) if node['build_essential']['compiletime']
Sauraus / memcached_instance.rb
Created Aug 12, 2013
Why is the :port not merged into the params hash for the definition?
View memcached_instance.rb
define :memcached_instance do
include_recipe "runit"
include_recipe "memcached"
opts = params
runit_service "memcached-#{params[:name]}" do
run_template_name "memcached"
default_logger true
cookbook "memcached"
View attr.rb
# Cookbook Name:: wrapper-nginx
# Attributes:: default
default['nginx']['openssl_source']['version'] = '1.0.1g'
default['nginx']['default_site_enabled'] = false
default['nginx']['disable_access_log'] = true
default['nginx']['gzip'] = 'on'
View encrypted data bag update
secret = Chef::EncryptedDataBagItem.load_secret("#{node['diw']['base']['secrets']}")
require 'net/ssh'
key =
private_key = key.to_pem
public_key = "#{key.ssh_type} #{[key.to_blob].pack('m0')}"
jenkins_keys = {
"id" => "#{node[:hostname]}",
Sauraus / provider
Last active Aug 29, 2015
Force execution of provider
View provider
selinux_policy_module modulename do
action :deploy
file "#{path}/#{modulename}.pp" do
action :delete
selinux_policy_module modulename do
Sauraus / chef-client
Created May 7, 2015
git recipe fails to install
View chef-client
Recipe: git::default
* git_client[default] action install
Error executing action `install` on resource 'git_client[default]'
undefined method `package_version' for Chef::Resource::YumPackage
Sauraus / error
Last active Aug 29, 2015
undefined method `action_create' for #<Chef::Provider::Package::Yum:0x000000014591f0>
View error
[2015-06-02T23:26:42+00:00] DEBUG: yum_package[chef] checking rpm status
warning: /tmp/kitchen/cache/omnibus_updater/chef-12.3.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
chef 12.3.0-1.el6
[2015-06-02T23:26:42+00:00] DEBUG: yum_package[chef] installed version: ["12.2.1-1.el6"] candidate version: 12.3.0-1.el6
Error executing action `create` on resource 'yum_package[chef]'
You can’t perform that action at this time.