I hereby claim:
- I am timogoebel on github.
- I am timogoebel (https://keybase.io/timogoebel) on keybase.
- I have a public key whose fingerprint is 9E64 7A17 F33A AECF BFB2 24C2 2B7F 983B A6C2 1733
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'fog' | |
require 'awesome_print' | |
require 'pry' | |
client = ::Fog::Compute.new( | |
:provider => 'vsphere', | |
:vsphere_username => 'xx', | |
:vsphere_password => 'xx', |
# config/initializers/plugin_test.rb | |
# This initializer allows to run tests from Foreman plugins | |
# via rails 5 test runner | |
# Usage: bundle exec rails test --engine foreman_bootdisk ../foreman_bootdisk/test/unit/example_test.rb | |
require 'rails/test_unit/runner' | |
module Foreman | |
module RailsRunnerExtensions | |
def attach_before_load_options(opts) | |
super |
I hereby claim:
To claim this, I am signing this object:
#cloud-config | |
hostname: <%= @host.name %> | |
fqdn: <%= @host %> | |
manage_etc_hosts: true | |
users: {} | |
runcmd: | |
- | | |
<%= indent(2) { snippet('puppet_setup customized', :variables => { :full_puppet_run => true }) } %> | |
phone_home: |
# lib/foreman_solarwinds/engine.rb | |
config.autoload_paths += Dir["#{config.root}/app/services"] | |
config.autoload_paths += Dir["#{config.root}/app/services/concerns"] | |
config.to_prepare do | |
begin | |
::IPAM.send(:include, ForemanSolarwinds::IpamExtensions) | |
rescue StandardError => e | |
Rails.logger.warn "ForemanSolarwinds: skipping engine hook (#{e})" | |
end |
From 7d31b83218e0abad7fdaf4534c8b0629dbc944a3 Mon Sep 17 00:00:00 2001 | |
From: Timo Goebel <mail@timogoebel.name> | |
Date: Mon, 6 Nov 2017 11:08:28 +0100 | |
Subject: [PATCH] convert: skip foreman tasks tables | |
--- | |
lib/tasks/convert.rake | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake |
import time | |
import fcntl, struct | |
lockfile = open('/media/test/lockfile', 'w') | |
lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) | |
while 1: | |
try: | |
fcntl.fcntl(lockfile.fileno(), fcntl.F_SETLK, lockdata) | |
print "I have the lock." | |
time.sleep(1) |
#!/usr/bin/env ruby | |
require 'ipaddr' | |
family = Socket::AF_INET | |
subnet_range = IPAddr.new("8.0.0.0/8", family).to_range | |
from = subnet_range.first(2).last | |
to = IPAddr.new(subnet_range.last.to_i - 2, family) |
facter --json | |
{ | |
"uptime_seconds": 14927393, | |
"architecture": "x86_64", | |
"virtual": "physical", | |
"is_virtual": false, | |
"augeasversion": "1.4.0", | |
"kernel": "Linux", | |
"is_rootserver": "true", | |
"blockdevice_sda_size": 4000787030016, |
source 'https://rubygems.org' | |
gem 'fog' | |
gem 'fog-vsphere' | |
gem 'awesome_print' | |
gem 'pry' |