Skip to content

Instantly share code, notes, and snippets.

@haus
haus / gist:1661720
Created January 23, 2012 08:22
cherry pick...
523 git checkout 2.7.x
524 git pull origin 2.7.x
525 git checkout -b ticket/2.7.x/4426
526 git cherry-pick 00e1882390
527 git cherry-pick b6d5b2ed15
528 git cherry-pick 649c507656
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a=()
>>> a+=(2,)
>>> print(a)
(2,)
>>>
Python 3.2.2 (default, Apr 5 2012, 18:13:42)
@haus
haus / rabbitmq
Created May 18, 2012 07:04 — forked from three18ti/rabbitmq
class RabbitMQ {
package { 'rabbitmq-server':
ensure => present,
require => Exec['add_rabbitmq_repository'],
}
exec { "wget -O- http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && apt-get update"
alias => 'add_rabbitmq_repository',
require => File["/etc/apt/sources.list.d/rabbitmq.list"],
unless => "dpkg -l rabbitmq-server",
General:
Currently, there are several cases regarding database setup in the PE installer. Note that the database setup routines only occur if the console is selected for install.
1) the installer checks for the existence of mysql.
* If it is found, the installer asks if the mysql server is running on a remote host. if it is remote, the user is prompted to enter host
and port information. if it is not remote, the installer assumes the mysql server is hosted on the current stations.
* If it is not found, the installer asks if the user would like to install MySQL server. If yes, the installer proceeds directly to step 3, below, skipping step 2.
Note: the install *will exit* if the user opts not to install MySQL server at this point. The installer does not support installing MySQL client only.
node default {
class { "profile::base": }
}
class profile::base {
class { "ntp": }
}
rpm -qpf --requires ~/yum.puppetlabs.com/el/5/products/x86_64/puppet-3.0.0-1.el5.noarch.rpm | grep ruby
/usr/bin/ruby
libselinux-ruby
ruby >= 1.8.7
ruby(abi) >= 1.8
ruby-augeas
ruby-shadow
exec {"something":
command => "bash -c 'for i in `ls /etc/apt/keys.d/*.{asc,pub,key}`; do apt-key add \$i; done'",
path => "/usr/bin:/usr/sbin:/bin:/sbin",
logoutput => true,
}
for just puppet agents:
in file /etc/apt/preferences.d/00-puppet.pref ...
Package: puppet puppet-common
Pin: version 2.7*
Pin-Priority: 501
for puppet agent and master:
in file /etc/apt/preferences.d/00-puppet.pref ...
diff rtyler-puppet-0.0.1/Gemfile rtyler-puppet-0.0.1-haus/Gemfile
3a4,5
> gem 'rspec-puppet'
> gem 'puppet-lint'
6,14c8
<
< group :test do
< gem 'rspec-puppet'
< gem 'puppet-lint'
< gem 'blimpy'
diff --git a/lib/facter/util/ec2.rb b/lib/facter/util/ec2.rb
index 197a5c9..90368e9 100644
--- a/lib/facter/util/ec2.rb
+++ b/lib/facter/util/ec2.rb
@@ -40,8 +40,10 @@ module Facter::Util::EC2
if Facter.value(:kernel) == 'windows'
arp_command = "arp -a"
mac_address.gsub!(":","-")
- else
+ elsif Facter.value(:kernel) == 'linux'