Skip to content

Instantly share code, notes, and snippets.

Greg Larkin greglarkin

Block or report user

Report or block greglarkin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View javapluginversion64_ver2.rb
#!/usr/bin/ruby
#
#
# author: Eric Ohtake
#
# The custom fact fetches the Java Plugin 64 bits version currently installed on the system.
#
## Key for the version v8u65 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF2681408560F
## Key for the version v8u66 HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\4EA42A62D9304AC4784BF2681408660F
View gist:1c1f81893c6edc06f851
$hierayaml = "${settings::confdir}/hiera.yaml"
$hash = loadyaml($hierayaml)
# Displays data with hash key "yaml" present
notice($hash)
# Extract the value of key "yaml"
$yaml = $hash['yaml']
# $yaml is undef?
View 1st time after renaming database.ini
Debug: Runtime environment: ruby_version=1.8.7, run_mode=user, puppet_version=3.7.5
Debug: Loading external facts from /var/lib/puppet/facts.d
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/firewall/lib/facter/ip6tables_version.rb
Debug: Loading facts from /etc/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
Debug: Loading facts from /etc/puppet/modules/firewall/lib/facter/iptables_version.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_updates.rb
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_update_last_success.rb
Info: Loading facts
@greglarkin
greglarkin / gist:45aea0bd7cd3061e7e94
Created May 21, 2015
Example usage of the puppetlabs-puppetdb module on Centos 5.x
View gist:45aea0bd7cd3061e7e94
class { 'puppetdb':
disable_ssl => true,
manage_package_repo => true,
postgres_version => '8.4',
}
class { 'puppetdb::master::config': }
$bindir1 = '/usr/pgsql-8.4'
$bindir2 = "${bindir1}/bin"
$bindirs = [ $bindir1, $bindir2 ]
View manifests_init.pp
class jdktest (
$versions = $jdktest::params::versions,
) inherits jdktest::params {
$package_names = prefix($versions, 'openjdk')
validate_array($versions)
validate_array($package_names)
contain jdktest::install
}
View systest_manifests_init.pp
class systest (
$sysctl_hash = undef,
) {
if $sysctl_hash {
validate_hash($sysctl_hash)
$sysctl_hash.each |$sysctl_name, $sysctl_attrs| {
validate_hash($sysctl_attrs)
sysctl { $sysctl_name:
@greglarkin
greglarkin / example.pp
Created Oct 16, 2014
Puppet file resource with array title
View example.pp
file { [ '/tmp/foo1', '/tmp/foo2', '/tmp/foo3' ]:
ensure => file
owner => 'root',
group => 'root',
mode => '0600',
}
You can’t perform that action at this time.