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 FileTest.exists?("#{selinux_mount_point}/enforce") | |
if FileTest.exists?("/proc/self/attr/current") | |
if (File.read("/proc/self/attr/current") != "kernel\0") |
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
[root@training cobbler]# cat zone.template | |
\$TTL 300 | |
@ IN SOA $cobbler_server. nobody.example.com. ( | |
$serial ; Serial | |
600 ; Refresh | |
1800 ; Retry | |
604800 ; Expire | |
300 ; TTL | |
) |
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/env ruby | |
require 'yaml' | |
YAML.load_file ARGV[0] |
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/env ruby | |
require 'yaml' | |
require "net/https" | |
require 'socket' | |
node=ARGV[0] | |
http = Net::HTTP.new('localhost', 443) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
begin |
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
with pe-httpd stopped | |
bash|curl | |
real 0m0.962s | |
user 0m0.198s | |
sys 0m0.580s | |
ruby |
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
https://github.com/jordansissel/fpm | |
require 'irb/completion' | |
# THIS FILE MANAGED BY PUPPET - EDIT BY HAND AT YOUR PERIL | |
<% foo = scope.to_hash -%> | |
<% foo.sort.each do |k,v| -%> | |
<%= "#{k} = #{v}" %> | |
<% 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 mcocertcollector ( $mcoclass = 'pe_mcollective', $clientpubkeydir = '/tmp/foo' ) { | |
$hosts = query_nodes("Class[${mcoclass}]") | |
file { $clientpubkeydir: | |
ensure => directory, | |
purge => true, | |
recurse => true, | |
} |
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
#!/opt/puppet/bin/puppet apply | |
include foo | |
class foo { | |
notify {'foomomomo': } | |
} |
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
service { 'iptables': | |
ensure => stopped, | |
enable => false, | |
hasstatus => false, | |
status => 'if [ -f /etc/init.d/iptables ]; then service iptables status; else false; fi', | |
} |
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 'false' { | |
notify { 'foo': } | |
} | |
[root@master2 ntp]# puppet apply foo.pp | |
Notice: Compiled catalog for master2 in environment production in 0.05 seconds | |
Notice: foo | |
Notice: /Stage[main]//Notify[foo]/message: defined 'message' as 'foo' | |
Notice: Finished catalog run in 0.40 seconds |