-
2.1.x (PE 2.0.x)
-
2.2.x
-
master
-
2.1.x → master 184 Commits
-
2.1.x → 2.2.x 177 Commits
-
2.2.x → master 6 Commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String | |
ZAML_ESCAPES = %w{\x00 \x01 \x02 \x03 \x04 \x05 \x06 \a \x08 \t \n \v \f \r \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \e \x1c \x1d \x1e \x1f } | |
def escaped_for_zaml | |
gsub( /\x5C/u, "\\\\\\" ). # Demi-kludge for Maglev/rubinius; the regexp should be /\\/ but parsetree chokes on that. | |
gsub( /"/u, "\\\"" ). | |
gsub( /([\x00-\x1F])/u ) { |x| ZAML_ESCAPES[ x.unpack("C")[0] ] }. | |
gsub( /([\x80-\xFF])/n ) { |x| "\\x#{x.unpack("C")[0].to_s(16)}" } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jeff@maynard] (2.7.x)(clean) 1.8.7@puppet src/puppet/lib/puppet | |
% irb | |
1.8.7 :001 > require 'puppet' | |
=> true | |
1.8.7 :002 > Puppet::Type.loadall | |
=> ["/vagrant/src/puppet/lib/puppet/type/augeas.rb", "/vagrant/src/puppet/lib/puppet/type/component.rb", "/vagrant/src/puppet/lib/puppet/type/computer.rb", "/vagrant/src/puppet/lib/puppet/type/cron.rb", "/vagrant/src/puppet/lib/puppet/type/exec.rb", "/vagrant/src/puppet/lib/puppet/type/file.rb", "/vagrant/src/puppet/lib/puppet/type/filebucket.rb", "/vagrant/src/puppet/lib/puppet/type/group.rb", "/vagrant/src/puppet/lib/puppet/type/host.rb", "/vagrant/src/puppet/lib/puppet/type/interface.rb", "/vagrant/src/puppet/lib/puppet/type/k5login.rb", "/vagrant/src/puppet/lib/puppet/type/macauthorization.rb", "/vagrant/src/puppet/lib/puppet/type/mailalias.rb", "/vagrant/src/puppet/lib/puppet/type/maillist.rb", "/vagrant/src/puppet/lib/puppet/type/mcx.rb", "/vagrant/src/puppet/lib/puppet/type/mount.rb", "/vagrant/src/puppet/lib/puppet/type/nagios_command.rb", "/vagrant/src/pup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# = motd class | |
# | |
# A Hierarchy of Class Param Value => Node Param Value => Module Default Value | |
# | |
# WITHOUT _real and UNSET ugliness! Hooray! | |
# ... but WITH inherits! Boo..? | |
# | |
# The class param value part of the hierarchy happens here since this is a parameterized class. | |
# The node param value and module default part of the hierarchy happens in params class | |
# we're inheriting from. |
root@pe-centos6:~# puppet module install rtyler/jenkins
Preparing to install into /etc/puppetlabs/puppet/modules ...
Downloading from http://forge.puppetlabs.com ...
Installing -- do not interrupt ...
/etc/puppetlabs/puppet/modules
└─┬ rtyler-jenkins (v0.2.1)
└── puppetlabs-apt (v0.0.2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# = Class: site::root_user | |
# | |
# This is a simple class to manage the root user password. | |
# The shadow hash of an existing password can be easily obtained | |
# by running `puppet resource user root` on a Linux system | |
# that has the desired root password already set. | |
# Puppet will then manage this password everywhere. | |
# | |
# First, I set the password to "puppet" on one Linux node and then get back the | |
# shadow hash. |
This module is located at http://forge.puppetlabs.com/puppetlabs/mysql
Installing the module is a single command in PE 2.5
root@pe-centos6:~# puppet module install puppetlabs-mysql
Preparing to install into /etc/puppetlabs/puppet/modules ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
################### OFFICIAL UBUNTU REPOS ################### | |
############################################################# | |
###### Ubuntu Main Repos | |
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse | |
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse | |
###### Ubuntu Update Repos | |
deb http://us.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
module Stomp | |
class Error < StandardError | |
end | |
end | |
module Jeff | |
def self.unknown_error | |
if Stomp.const_defined? "Error" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use it | |
# I want this windows machine to announce the time as described at: | |
# http://support.microsoft.com/kb/816042 | |
registry::subkey { 'HKLM\System\CurrentControlSet\Services\W32Time\Config\AnnounceFlags': | |
value_data => 'A', | |
value_type => DWORD, | |
} | |
# The definition |