Skip to content

Instantly share code, notes, and snippets.

View kjetilho's full-sized avatar

Kjetil Torgrim Homme kjetilho

  • Redpill Linpro AS
  • Oslo, Norway
View GitHub Profile
@kjetilho
kjetilho / rspec output
Created June 22, 2017 13:01
spec/unit/facter/server_type_spec.rb
Failures:
1) server_type hostname => pro-dev-db01 should return development
Failure/Error: expect(Facter.fact(:server_type).value).to eq(result)
expected: "development"
got: "testing za-testing-bar-db02"
(compared using ==)
# ./spec/unit/facter/server_type_spec.rb:23:in `block (5 levels) in <top (required)>'
@kjetilho
kjetilho / phys_interfaces.rb
Created September 1, 2016 11:48
phys_interfaces fact
# phys_interfaces returns network interfaces associated with a physical device
# as a comma separated list.
#
# Written by kjetil.homme@redpill-linpro.com 2016
# Released into the public domain
require 'facter'
Facter.add("phys_interfaces") do
confine :kernel => :linux
require 'spec_helper'
describe 'bareos::client::fileset' do
context "basic fileset" do
let(:title) { 'basic' }
let(:params) { { :include_paths => ['/custom'] } }
let(:facts) { RSpec.configuration.default_facts }
let(:pre_condition) { <<-eot
class bareos::client {
$client_name = $::fqdn
@kjetilho
kjetilho / keybase.md
Created April 16, 2014 10:00
My keybase.io proof

Keybase proof

I hereby claim:

  • I am kjetilho on github.
  • I am kjetilho (https://keybase.io/kjetilho) on keybase.
  • I have a public key whose fingerprint is 74F8 22A9 A8D0 8445 BAFC A38B A594 E797 D89D 7131

To claim this, I am signing this object: