This file contains hidden or 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 foo { | |
include ::bar | |
notify { $name: } | |
Class[$name] ~> Class["bar"] | |
} | |
class bar { | |
notify { $name: } | |
} |
This file contains hidden or 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
dan@dan-MacPro ~/projects/vagrant/labs/puppet $ puppet apply | |
define foo() { | |
notify { $name: } | |
} | |
foo { "baz": | |
require => Foo['bar'], | |
} | |
foo { "bar": } | |
^D |
This file contains hidden or 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
import re | |
import os | |
import pycurl | |
URL="http://xxx:8080/artifactory/play-release-local/xxx" | |
AUTH="play:xxx" | |
for local_file in os.listdir("."): | |
module, version = re.sub('\.(zip|dependencies\.yml)$', '', local_file).split("-", 1) | |
remote_file = re.sub('\.dependencies\.yml$', '-dependencies.yml', local_file) |
This file contains hidden or 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
[1] pry(main)> require 'puppet' | |
=> true | |
[2] pry(main)> Puppet[:code] = "node /^foo\.\d{2}\.bar$/ {}" | |
=> "node /^foo.d{2}.bar$/ {}" | |
[3] pry(main)> node = Puppet::Node::Environment.new(Puppet[:environment]).known_resource_types.nodes.first | |
=> ["foo.d2.bar", | |
#<Puppet::Resource::Type:0x7f6fcc5f5fd0 | |
@arguments={}, | |
@doc="", | |
@line=1, |
This file contains hidden or 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 'puppet', '~> 2.6.0' | |
gem 'facter' | |
gem 'randexp' |
This file contains hidden or 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 ruby | |
require 'fog' | |
require 'graphviz' | |
ec2 = Fog::Compute.new(:provider => 'AWS') | |
graph = GraphViz::new("structs", "type" => "graph") | |
groups = ec2.security_groups | |
group_map = Hash[groups.collect { |g| [g.group_id, g.name] }] |
This file contains hidden or 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
[dcarley@uskopcilog53t ~]$ sudo yum resolvedep -q "libcairo.so.2()(64bit)" "libpixman-1.so.0()(64bit)" "libfreetype.so.6()(64bit)" "libfontconfig.so.1()(64bit)" "libpng12.so.0(PNG12_0)(64bit)" "libXrender.so.1()(64bit)" "libXau.so.6()(64bit)" | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 | |
0:vmware-tools-libraries-x-8.6.5-2.x86_64 |
This file contains hidden or 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
define test_define( | |
$param_one = 'one', | |
$param_two = $param_one | |
) { | |
if $param_one == $param_two { | |
notice('eagar evaluation') | |
} else { | |
notice('lazy evaluation') | |
} | |
} |
This file contains hidden or 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
$ ps -o user,pid,vsz,rss,args -C cma | |
USER PID VSZ RSS COMMAND | |
root 1819 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1834 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1836 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1838 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1895 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1896 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1897 196940 12964 /opt/McAfee/cma/bin/cma | |
root 1898 196940 12964 /opt/McAfee/cma/bin/cma |