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
Welcome to <%= @hostname %> | |
Installed Java versions are: | |
<% @java_versions.each do |version| -%> | |
<%= version %> | |
<% 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
class apache { | |
package { 'httpd': | |
ensure => present, | |
} | |
file { '/etc/httpd/conf/httpd.conf': | |
ensure => file, | |
owner => 'root', | |
group => 'root', | |
mode => '0644', | |
source => 'puppet:///modules/apache/httpd.conf', |
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
# ntp.conf: Managed by puppet. | |
restrict 127.0.0.1 | |
restrict -6 ::1 | |
restrict default kod nomodify notrap nopeer noquery | |
restrict -6 default kod nomodify notrap nopeer noquery | |
<% @servers.each do |server| -%> | |
server <%= server %> |
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
# /etc/puppet/modules/users/manifests/init.pp | |
class users { | |
user { 'greg': | |
ensure => present, | |
gid => 'supercool', | |
} | |
user { 'david': | |
ensure => present, | |
gid => 'supercool', | |
} |
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 bash | |
SOURCE='source' | |
TARGET='target' | |
for file in $(find $SOURCE -type f -name \*.txt) ; do | |
filename="$(basename $file)" | |
first="$(echo $filename | cut -c1)" | |
mkdir -p $TARGET/$first | |
mv -v $file $TARGET/$first/$filename |
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
if File.exist?('/usr/local/.git') | |
Facter.add(:homebrew_stale) do | |
confine :kernel => 'Darwin' | |
setcode do | |
parse_head_time = 'git --git-dir=/usr/local/.git log --pretty=format:%ct' | |
head_time = Facter::Core::Execution.exec(parse_head_time).to_i | |
now = Time.now.to_i | |
age = now - head_time | |
age > 60*60*24 | |
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
$hiera_datadir = "\"${settings::confdir}/environments/%{environment}/hieradata\"" | |
$eyaml_keys = "${settings::confdir}/keys" | |
$eyaml_public = "${eyaml_keys}/public_key.pkcs7.pem" | |
$eyaml_private = "${eyaml_keys}/private_key.pkcs7.pem" | |
class { 'hiera::eyaml': | |
confdir => $settings::confdir, | |
create_keys => false, | |
before => Class['hiera'], | |
} |
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
pwd = File.expand_path(Dir.pwd, 'spec') | |
ENV['MODULEPATH'] = "#{pwd}/site:#{pwd}/modules" | |
require 'puppetlabs_spec_helper/module_spec_helper' |
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
package { 'Puppet Enterprise (64-bit)': | |
ensure => '3.7.2', | |
source => 'C:\vagrant\puppet-enterprise-3.7.2-x64.msi', | |
} |
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
[{"parameters":{"manage_groups":"true","manage_users":"true","manage_sudoers":"false","data_store":"\"namespace\"","data_namespace":"\"pe_accounts::data\"","sudoers_path":"\"/etc/sudoers\""},"environment":"production","name":"pe_accounts"},{"parameters":{"groups_hash":null},"environment":"production","name":"pe_accounts::groups"},{"parameters":{"prune_cron_target":"\"root\"","prune_upto":"30","ensure_prune_cron":"\"present\"","prune_cron_monthday":"\"absent\"","prune_cron_month":"\"absent\"","prune_cron_weekday":"\"absent\"","prune_cron_hour":"1","prune_cron_user":"\"root\"","prune_unit":"\"day\"","prune_cron_minute":"0"},"environment":"production","name":"pe_console_prune"},{"parameters":{"package_name":"$pe_postgresql::params::client_package_name","package_ensure":"\"present\""},"environment":"production","name":"pe_postgresql::client"},{"parameters":{"encoding":"undef","service_status":"undef","confdir":"undef","postgis_version":"undef","client_package_name":"undef","group":"undef","manage_package_repo":"u |