classify_cluster 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ module ClassifyCluster
3
3
  class Cluster
4
4
  attr_reader :nodes, :name, :classes, :variables, :resources, :hostnames, :ssl_pem
5
5
  def initialize(*args, &block)
6
- @ssl_pem = {}
6
+ @ssl_pem = {:file_path => '/etc/ssl/pem/raa.pem', :module => 'loadbalancer'}
7
7
  @nodes = {}
8
8
  @variables = {}
9
9
  @resources = []
@@ -70,7 +70,7 @@ module ClassifyCluster
70
70
  @node.cluster.variables['fileserver_hosts'] ||= []
71
71
  @node.cluster.variables['fileserver_hosts'] << @node.private_ip
72
72
  when 'cache'
73
- @node.cluster.variables 'cache_host', @node.private_ip
73
+ @node.cluster.variable 'cache_host', @node.private_ip
74
74
  end
75
75
  end
76
76
  def method_missing(method_name, *args)
@@ -1,3 +1,3 @@
1
1
  module ClassifyCluster
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -6,13 +6,14 @@ module ClassifyCluster
6
6
  options.reverse_merge! :config_file => ClassifyCluster::Base.default_config_file
7
7
  config = ClassifyCluster::Configurator::Configuration.new(options[:config_file])
8
8
  config.clusters.each_pair do |name, cluster|
9
+
9
10
  next if options[:cluster] && !(options[:cluster] == cluster.name.to_s)
10
- unless cluster.ssl_pem.empty?
11
- pem_file = "/etc/puppet/modules/#{cluster.ssl_pem[:module]}/files/#{cluster.name.to_s}.#{File.basename(cluster.ssl_pem[:file_path])}"
12
- FileUtils.cp cluster.ssl_pem[:file_path], pem_file
13
- FileUtils.chown 'root', 'puppet', pem_file
14
- FileUtils.chmod 0640, pem_file
15
- end
11
+
12
+ pem_file = "/etc/puppet/modules/#{cluster.ssl_pem[:module]}/files/#{cluster.name.to_s}.#{File.basename(cluster.ssl_pem[:file_path])}"
13
+ FileUtils.cp cluster.ssl_pem[:file_path], pem_file
14
+ FileUtils.chown 'root', 'puppet', pem_file
15
+ FileUtils.chmod 0640, pem_file
16
+
16
17
  File.open(File.join(export_to_folder, "#{cluster.name}.pp"), 'w') do |file|
17
18
  cluster.nodes.each_pair do |fqdn, node|
18
19
  file.write(output(%Q%node "#{node.default? ? 'default' : node.fqdn}" {%))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classify_cluster
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Cashin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-22 00:00:00 -08:00
18
+ date: 2010-11-23 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency