Skip to content

Instantly share code, notes, and snippets.

View fatmcgav's full-sized avatar

Gavin Williams fatmcgav

View GitHub Profile
@fatmcgav
fatmcgav / module_data_backend.rb.patch
Created May 16, 2016 10:56
Module_data_backend patch for scope issue
diff --git a/lib/hiera/backend/module_data_backend.rb b/lib/hiera/backend/module_data_backend.rb
index 8bed934..6987209 100644
--- a/lib/hiera/backend/module_data_backend.rb
+++ b/lib/hiera/backend/module_data_backend.rb
@@ -61,22 +62,33 @@ class Hiera
found = false
Hiera.debug("Looking up %s in Module Data backend" % key)
+ Hiera.debug("Module = #{scope['module']}")
+ Hiera.debug("Module_name = #{scope["module_name"]}")
@fatmcgav
fatmcgav / clc-test.tf
Created March 4, 2016 14:33
Terraform provisioner
#
## Testing Terraform CLC support
#
# Setup CLC Terraform provider
provider "clc" {
username = "xxx"
password = "xxx"
account = "IAST"
}
@fatmcgav
fatmcgav / Puppet agent error
Last active February 15, 2016 15:47
Invalid relationship when using hiera_resources
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Cs_group[g_nfs] { notify => Cs_commit['add_drbd_nfs'] }, because Cs_commit['add_drbd_nfs'] doesn't seem to be in the catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
@fatmcgav
fatmcgav / Blueprint build log
Last active February 1, 2016 09:53
password_test CLC script package
2016-02-01 09:23:12.6155 [Trace] [Root] - <<<<<<<<<< Blueprint build started from step 0 >>>>>>>>>>
2016-02-01 09:23:12.7093 [Info ] [Root] - Blueprint properties:
TemplateID => 4726
T3.BuildServerTask.Password => ********
T3.BuildServerTask.GroupID => f6bdcb1f-c139-4d75-bdb4-d11f22a7761c
T3.BuildServerTask.Network => vlan_2195_10.105.195
T3.BuildServerTask.PrimaryDNS => 10.106.81.14
T3.BuildServerTask.HardwareType => Standard
@fatmcgav
fatmcgav / production.log
Created January 18, 2016 10:04
Foreman v2 API host create
2016-01-18 09:59:34 [app] [I]
|
| Started POST "/api/hosts" for 10.106.81.15 at 2016-01-18 09:59:34 +0000
2016-01-18 09:59:34 [app] [I] Processing by Api::V2::HostsController#create as JSON
2016-01-18 09:59:34 [app] [I] Parameters: {"host"=>{"mac"=>"00:0c:29:ab:64:52", "ip"=>"10.106.81.15", "domain"=>1, "name"=>"test1"}, "apiv"=>"v2"}
2016-01-18 09:59:34 [app] [I] Authorized user provisioner(Provisioning Account)
2016-01-18 09:59:34 [app] [W] Action failed
| ActiveRecord::AssociationTypeMismatch: Domain(#54904900) expected, got Fixnum(#6471760)
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/association.rb:204:in `raise_on_type_mismatch'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/belongs_to_association.rb:6:in `replace'
@fatmcgav
fatmcgav / curl output
Created January 15, 2016 17:22
Foreman API Creation attempt
# curl -sS -u provisioner -k -H "Content-Type: application/json" -XPOST http://foreman.weareact.net/api/v2/hosts -d '
{
"host": {
"name": "test1.test.weareact.net",
"enabled": true,
"ipaddress": "10.106.81.15"
}
}'
Enter host password for user 'provisioner':
<html><body>You are being <a href="https://foreman.weareact.net/api/hosts">redirected</a>.</body></html>
@fatmcgav
fatmcgav / 1.9.2-v2.json
Last active January 15, 2016 15:56
python-foreman Foreman 1.9
This file has been truncated, but you can view the full file.
{
"docs": {
"info": "\n<p>Foreman API v2 is currently the default API version.</p>\n",
"name": "Foreman",
"copyright": "",
"link_extension": ".html",
"doc_url": "../apidoc/v2",
"resources": {
"tasks": {
"api_url": "/api",
@fatmcgav
fatmcgav / influxdb.conf
Created October 21, 2015 09:25
InfluxDB TSM1 Crash
### Welcome to the InfluxDB configuration file.
# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
# The data includes raft id (random 8 bytes), os, arch, version, and metadata.
# We don't track ip addresses of servers reporting. This is only used
# to track the number of instances running and the versions, which
# is very helpful for us.
# Change this option to true to disable reporting.
reporting-disabled = false
@fatmcgav
fatmcgav / grafana dashboard
Created October 20, 2015 16:26
Grafana InfluxDB 'found USER'
{
"id": 1,
"title": "New dashboard",
"originalTitle": "New dashboard",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
@fatmcgav
fatmcgav / log output
Created August 24, 2015 15:55
Beaker test failure on puppetlabs-mongodb
1) mongodb::server class behaves like auth tests default parameters with 10gen => true and auth => true Command "mongo admin --quiet --eval "load('/root/.mongorc.js');printjson(db.getUser('admin')['customData'])"" #stdout should contain "Puppet Mongodb_user['admin']"
Failure/Error: it { is_expected.to contain "Puppet Mongodb_user['admin']"}
expected "{ \"createdBy\" : \"Puppet Mongodb_user['admin']\" }" to contain "Puppet Mongodb_user['admin']"
Shared Example Group: "auth tests" called from ./spec/acceptance/server_spec.rb:234
# ./spec/acceptance/server_spec.rb:203:in `block (6 levels) in <top (required)>'