Skip to content

Instantly share code, notes, and snippets.

View ody's full-sized avatar

Cody Herriges ody

  • Puppet Labs
  • Oregon, United States of America
View GitHub Profile
@ody
ody / gist:5718115
Last active December 18, 2015 03:29
---
# Data needed for Class['openstack::compute']
# The IP and interface that external sources will use to communicate with the instance and hypervisors.
openstack::compute::public_interface: 'eth0'
openstack::compute::internal_address: "%{ipaddress_eth0}"
openstack::compute::iscsi_ip_address: "%{ipaddress_eth0}"
# The interface that will handle instance to intance communication and instance outbound traffic.
openstack::compute::private_interface: 'eth1'
root@ningyo:~# puppet cert --list --trace
Error: Could not create resources for managing Puppet's files and directories in sections [:main, :ssl, :ca]: undefined method `exists?' for #<Puppet::Type::Group:0x7f50216fd5d8>
/usr/lib/ruby/vendor_ruby/puppet/settings.rb:725:in `service_group_available?'
/usr/lib/ruby/vendor_ruby/puppet/settings/file_setting.rb:54:in `send'
/usr/lib/ruby/vendor_ruby/puppet/settings/file_setting.rb:54:in `safe_to_use_settings_value?'
/usr/lib/ruby/vendor_ruby/puppet/settings/file_setting.rb:45:in `value'
/usr/lib/ruby/vendor_ruby/puppet/settings/file_setting.rb:102:in `group'
/usr/lib/ruby/vendor_ruby/puppet/settings/file_setting.rb:157:in `to_resource'
/usr/lib/ruby/vendor_ruby/puppet/settings.rb:847:in `to_catalog'
/usr/lib/ruby/vendor_ruby/puppet/settings.rb:844:in `each'
class foo($message = 'foo is the message') {
notify { 'foo': message => $message }
}
class baz inherits foo {
$message = 'baz is the message'
Notify['foo'] { message => $message }
}
# Just propagates the event to the caching daemon.
exec { 'propagation hack to nscd!':
command => 'echo "propogating to Class[nscd]"',
path => [ '/bin', '/usr/bin' ],
refreshonly => true,
notify => Class['nscd'],
}
# Add this to auth.conf
# status
path /status
auth any
method find
allow *
# Run this from the command line
curl -k -H "Accept: pson" https://metis.puppetlabs.lan:8140/production/status/no_key
Class Foo
attr_accessor :bar
def initialize
@bar = 'new'
end
end
afoo = Foo.new
Sending QUIT signal to process 25785 ...
>> Exiting!
/var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `delete': Operation not permitted - /var/run/thin/puppetmaster.3.pid (Errno::EPERM)
from /var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `remove_pid_file'
from /var/lib/gems/1.8/gems/thin-1.3.1/lib/thin/daemonizing.rb:59:in `daemonize'
info: Caching catalog for yellow.dc1.puppetlabs.net
/usr/lib/ruby/1.8/puppet/resource.rb:235:in `to_hash'
/usr/lib/ruby/1.8/puppet/resource.rb:68:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `collect'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:505:in `to_pson_data_hash'
/usr/lib/ruby/1.8/puppet/indirector/catalog/puppetdb.rb:19:in `munge_catalog'
/usr/lib/ruby/1.8/puppet/indirector/catalog/puppetdb.rb:9:in `save'
/usr/lib/ruby/1.8/puppet/indirector/store_configs.rb:24:in `save'
/usr/lib/ruby/1.8/puppet/indirector/indirection.rb:200:in `find'
ldap_entry { 'uid=cody,ou=people,dc=puppetlabs,dc=net':
ensure => present,
objectclass => [
'organizationalPerson',
'inetOrgPerson',
'posixAccount',
'person',
],
attributes => {
'employeeNumber' => '10000000001',
# Temporary machine to develop ldap client implementation against.
node 'ldap-dev.dc1.puppetlabs.lan' {
include role::server
sudo::allowgroup { "techops": }
ssh::allowgroup { "techops": }
}