Skip to content

Instantly share code, notes, and snippets.

View fatmcgav's full-sized avatar

Gavin Williams fatmcgav

View GitHub Profile
@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 / domain.rb
Last active January 4, 2016 06:09
Failing Autorequires test
Puppet::Type.newtype(:domain) do
@doc = "Manage Glassfish domains"
ensurable
...
# Autorequire the user running command
autorequire(:user) do
self[:user]
end
@fatmcgav
fatmcgav / Type.rb
Last active January 4, 2016 00:48
File.exists? type testing
Puppet::Type.newtype(:domain) do
@doc = "Manage Glassfish domains"
ensurable
...
newparam(:passwordfile) do
desc "The file containing the password for the user."
@fatmcgav
fatmcgav / failure-trace.log
Last active December 30, 2015 11:09
rspec-puppet failure point
Failure/Error: it { should_not contain_class('act::software::hp::psp') }
Puppet::Error:
Puppet::Parser::AST::Resource failed with error TypeError: can't convert Hash into String at /etc/puppet/environments/common/act/spec/fixtures/modules/act/manifests/software/linux/puppet_agent.pp:27 on node puppet-dev.card.co.uk
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/hiera.rb:21:in `exist?'
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/hiera.rb:21:in `hiera_config'
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/hiera.rb:32:in `hiera'
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/hiera.rb:36:in `hiera'
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/hiera.rb:12:in `find'
# /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:197:in `find'
# /usr/lib/ruby/site_ruby/1.8/puppet/resource.rb:331:in `lookup_external_default_for'
@fatmcgav
fatmcgav / Puppet apply debug
Created November 25, 2013 14:27
Puppet apply debug output for installing package without an existing versionlock entry.
$ sudo puppet apply -e "package {'dos2unix': ensure => latest }" -d
...
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/oracle_clones.rb
Info: Loading facts in /var/lib/puppet/lib/facter/oracle_db_homes.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/smo_version.rb