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
| perl "randomscript" do | |
| script <<-EOH | |
| my $meminfo = `cat /proc/meminfo` | |
| # some other random perl stuff | |
| EOH | |
| end |
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 MonkeyController < Application | |
| provides :html, :json | |
| def index | |
| @monkey_list = Monkey.list | |
| if params[:partial] == "true" | |
| display @node_list, :template => "foobar" # this is probably wrong | |
| else | |
| display @node_list |
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 packagename { | |
| package { "name": | |
| ensure => installed | |
| } | |
| } |
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 packagename { | |
| package { "name": | |
| ensure => installed | |
| } | |
| } |
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 base { | |
| case $lsbdistid { | |
| Debian: { | |
| include debian | |
| } | |
| CentOS: { | |
| include centos | |
| } | |
| Ubuntu: { | |
| include ubuntu |
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
| cap -S user=hjk-adam -S recipe=ec2 -S master=ops1prod.sli.juiceanalytics.com -S host_type=simple -S number=1 create |
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
| # Would do a real require of libraries | |
| Dir[ | |
| File.join( | |
| File.dirname(__FILE__), | |
| 'foobar/**/*.rb' | |
| )].sort.each { |lib| require lib } | |
| # Would load a random class by name in a slightly terrifying way | |
| def load_me(name, *args) | |
| resource = eval(name).new(*args) |
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
| # call with cap -S only_host=monkeypants | |
| only_host ||= nil | |
| role(:monkey) do | |
| if only_host | |
| [ only_host ] | |
| else | |
| [ :static, :host, :list ] | |
| end | |
| end |
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
| runit_service { "tasktracker": | |
| directory => "/etc/sv", | |
| templatedir => "foo-datanode/tasktracker", | |
| onlyif => "/usr/bin/test ! -f /srv/tasktracker/current/bin/hadoop", | |
| logconfig => true, | |
| require => File["/srv/tasktracker"] | |
| } | |
| # foo-datanode/tasktracker has run.erb, log-run.erb, and log-config.erb (optionally) |
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
| <%- ipaddress =~ /(\d+?)\.(\d+?)\.(\d+)\.\d+/ %> | |
| <%= "#{$3}.#{$2}.#{$1}.in-addr.arpa %> |
OlderNewer