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
| before 'deploy:symlink' { | |
| # copy config file to release_path | |
| upload (source, #{release_path}) | |
| } |
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
| before 'deploy:symlink' do | |
| # copy config file to release_path | |
| upload (source, '#{release_path}') | |
| 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
| role :counter do | |
| enum_counter | |
| end | |
| task :enum_counter, :roles => [:puppet_masters] do | |
| desc "Enumerate hosts that are counter servers from puppet DB" | |
| hosts = Hash.new | |
| cmd = 'sc_hosts.rb --class site::statcounter::profile::counter' | |
| run cmd, :pty => true do |ch, stream, out| | |
| next if out.chomp =='' | |
| out.split("\r\n").each do |host| |
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
| namespace :deploy do | |
| task :example do | |
| puts "" | |
| end | |
| end | |
| namespace :database do | |
| task :configured? do | |
| true if capture("/mysql/daemon.status/or/something?") =~ /OK/ |
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
| [2012-04-28 00:00:00,599][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] creating index, cause [auto(index api)], shards [5]/[1], mappings [] | |
| [2012-04-28 00:00:00,871][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [syslog] (dynamic) | |
| [2012-04-28 00:00:00,972][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [syslog] (dynamic) | |
| [2012-04-28 00:00:02,070][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [log4j] (dynamic) | |
| [2012-04-28 00:00:03,221][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [log4j] (dynamic) | |
| [2012-04-28 00:00:03,551][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [apache-access] (dynamic) | |
| [2012-04-28 00:00:03,614][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapping [apache-access] (dynamic) | |
| [2012-04-28 00:00:24,759][INFO ][cluster.metadata ] [Silver] [logstash-2012.04.28] update_mapp |
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
| node default { | |
| include | |
| stdlib | |
| hiera_include('classes') | |
| $applications = hiera('applications', nil) | |
| $resources = keys($applications) |
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
| --- | |
| resources: | |
| app::core::instance: | |
| - 01 | |
| - 07 | |
| - 10 | |
| app::sdp::instance: | |
| - 02 |
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
| module Puppet::Parser::Functions | |
| newfunction(:hiera_create_resources, :type => :rvalue) do |*args| | |
| if args[0].is_a?(Array) | |
| args = args[0] | |
| end | |
| key = args[0] || nil | |
| default = args[1] || nil | |
| override = args[2] || nil |
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
| applications: | |
| app::core::instance: | |
| '01': | |
| index: '01' | |
| '02': | |
| index: '02' |
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
| answer.each_key { |resource| | |
| answer[resource].each_key { |instance| | |
| function_create_resources(resource, answer[resource][instance]) | |
| } | |
| } |
OlderNewer