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
# === Actions: | |
# | |
# === Requires: | |
# | |
# === Sample Usage: | |
# | |
class passenger::params ( | |
$packages = undef, | |
$configpath = undef, | |
$version = undef, |
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/perl | |
## Strips the newline from the end of a file. | |
# This is important because we cant have newlines after the pw hash. | |
# Run this on a file before committing. | |
use autodie qw(open sysseek sysread truncate); | |
my $file = shift; | |
open my $fh, '+>>', $file; |
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
source :rubygems | |
gem 'rake' | |
gem 'rspec', '>2' | |
gem 'rspec-puppet' | |
gem 'puppetlabs_spec_helper' | |
## Optionally use puppet-lint for style checks. | |
#gem 'puppet-lint' |
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
Original header used now: | |
### File managed with puppet ### | |
## Served by: '<%= scope.lookupvar('::servername') %>' | |
## Module: '<%= scope.to_hash['module_name'] %>' | |
## Template source: 'MODULES<%= template_source.gsub(Regexp.new("^#{Puppet::Node::Environment.current[:modulepath].gsub(':','|')}"),"") %>' | |
Problem: When using puppet apply with relative modulepath, the information can be wrong or messy. | |
Alternative 1: |
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
## Config created by foreman-database.yml.erb | |
production: | |
adapter: mysql2 | |
name: puppet_test | |
password: password | |
server: localhost | |
user: puppet | |
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
## github.com/UnifiedPost/puppet-percona (development) | |
node /^perconadb/ { | |
$adminpass = 'skittles' | |
percona::mgmt_cnf {'/etc/.puppet.cnf': | |
password => $adminpass, | |
} | |
class {'percona::adminpass': password => $adminpass } | |
class {'percona': | |
server => true, | |
mgmt_cnf => '/etc/.puppet.cnf', |
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
#!/bin/sh | |
# | |
# Installation: | |
# To use this script, place it in the commands directory of your | |
# gitolite installation. (Hint: ~/gitolite/src/commands/) | |
# You will also have to add the command to the allowed commands in | |
# your .gitolite.rc configuration file. | |
# | |
# Permissions: | |
# The script requires the same permissions as the desc command. |
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 a custom lens to do something. | |
class example::custom { | |
if $::servername { | |
} else { | |
warning("puppet apply runs do not detect the correct lensdir: using dirty hack") | |
$lensdir = inline_template("<%= File.expand_path(File.join(File.dirname(scope.source.file),'../lib/augeas/lenses')) %>") | |
Augeas { | |
load_path => "${lensdir}" | |
} |
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
augtool> print /files/etc/auto.test/*[label() != '#comment'][. = 'test'] | |
/files/etc/auto.test/2 = "test" | |
/files/etc/auto.test/2/location | |
/files/etc/auto.test/2/location/1 | |
/files/etc/auto.test/2/location/1/host = "localhost" | |
/files/etc/auto.test/2/location/1/path = "/my/path" | |
augtool> set /files/etc/auto.test/*[label() != '#comment'][. = 'test']/opt[last() + 1] nocto | |
augtool> print /files/etc/auto.test/*[label() != '#comment'][. = 'test'] |
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
# | |
# Recommended minimum configuration: | |
# | |
acl manager proto cache_object | |
acl localhost src 127.0.0.1/32 ::1 | |
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 | |
# Example rule allowing access from your local networks. | |
# Adapt to list your (internal) IP networks from where browsing | |
# should be allowed |
OlderNewer