Skip to content

Instantly share code, notes, and snippets.

#
# /etc/pam.d/common-account - authorization settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authorization modules that define
# the central access policy for use on the system. The default is to
# only deny service to users whose accounts are expired in /etc/shadow.
#
account required pam_access.so accessfile=/etc/security/login_access.conf
account sufficient pam_ldap.so
ad
apache2
apparmor
apt-cacher
apt-proxy
beaver
build-essential
capistrano
centos
common
Index: deploy/lib/render_template.rb
===================================================================
--- deploy/lib/render_template.rb (revision 4537)
+++ deploy/lib/render_template.rb (working copy)
@@ -15,14 +15,23 @@
from_file = File.join(args[:base_path], args[:from_file])
to_file = File.join(args[:base_path], args[:to_file])
yaml_file = "/tmp/render_template.#{rand(1000000)}.yml"
+ exec_file = "/tmp/exec_render_template.#{rand(1000000)}.yml"
#
# A simple icagent recipe. Takes all the facter facts and submits them to
# iClassify.
#
ENV['FACTERLIB'] = '/var/lib/puppet/lib/facter'
require 'rubygems'
require 'facter'
Facter.each do |name, value|
@adamhjk
adamhjk / java.pp
Created September 26, 2008 20:14
Java preseeding recipe
class java {
case $lsbdistid {
CentOS: { }
default: {
case $lsbdistid {
Debian: {
case $lsbdistcodename {
etch: {
$javasdk = "sun-java5-jdk"
$alternative = "java-5-sun"
edit_file "/etc/myfile"
if node[:somecondition] == true
notifies resources(:edit_file => "/etc/myfile"), { :append => "some line to the file" }
end
user "adam" do
uid 555
gid 100
home "/home/adam"
comment "Adam Jacob"
supports :create_home => true
end
@stdout.stub!(:each).and_yield("emacs:").
and_yield(" Installed: (none)").
and_yield(" Candidate: (none)").
and_yield(" Version Table:")
#
# Set up our puppet environment
#
unless attrib?("puppet_env")
hostname = attrib?("hostname")
fqdn = attrib?("fqdn")
if fqdn =~ /amazonaws.com$/
replace_attrib("puppet_env", "prod")
else
task :classify_nodes do
@dns_names.each do |description|
description =~ /^(.+?)\..+$/
hostname = $1
node = @ic.get_node(hostname)
if exists?(:puppet_env)
EC2_DATA[:iclassify_attribs][:puppet_env] = puppet_env
end
node.tags = EC2_DATA[:iclassify_tags]
EC2_DATA[:iclassify_attribs].each do |name, values|