le1t0-deprec 2.1.6.087 → 2.1.6.088

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,10 @@ Capistrano::Configuration.instance(:must_exist).load do
22
22
 
23
23
  set :glusterfs_defaults, { }
24
24
  set :glusterfs_exports, { }
25
- set :glusterfs_client_config_local, false
25
+ set :glusterfs_client_config_local, { }
26
+
27
+ # DON'T use this one, it's only used for internal purposes
28
+ set :glusterfs_client_config_contents, ""
26
29
 
27
30
  SRC_PACKAGES[:glusterfs] = {
28
31
  :md5sum => "e2eaf3d1e7a735ee7e7b262a46bbc75d glusterfs-3.0.4.tar.gz",
@@ -52,18 +55,18 @@ Capistrano::Configuration.instance(:must_exist).load do
52
55
 
53
56
  desc "Generate configuration file(s) for Glusterfs from template(s)"
54
57
  task :config_gen do
55
- system_config_files = SYSTEM_CONFIG_FILES[:glusterfs].dup
56
- if glusterfs_client_config_local
57
- glusterfs_exports.each do |name, cfg|
58
- system_config_files << {
59
- :template => "glusterfs.vol.erb",
60
- :path => "/etc/glusterfs/#{name}-#{cfg[:transport] || glusterfs_defaults[:transport] || 'tcp'}.vol",
61
- :mode => 0644,
62
- :owner => 'root:root'
63
- }
64
- end
58
+ glusterfs_client_config_local.each do |name, contents|
59
+ set :glusterfs_client_config_contents, contents
60
+ cfg = glusterfs_exports[name]
61
+ deprec2.render_template(:glusterfs, {
62
+ :template => "glusterfs.vol.erb",
63
+ :path => "/etc/glusterfs/#{name}-#{cfg[:transport] || glusterfs_defaults[:transport] || 'tcp'}.vol",
64
+ :mode => 0644,
65
+ :owner => 'root:root'
66
+ })
65
67
  end
66
- system_config_files.each do |file|
68
+ set :glusterfs_client_config_contents, ""
69
+ SYSTEM_CONFIG_FILES[:glusterfs].each do |file|
67
70
  deprec2.render_template(:glusterfs, file)
68
71
  end
69
72
  end
@@ -0,0 +1 @@
1
+ <%= glusterfs_client_config_contents %>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: le1t0-deprec
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.1.6.087
5
+ version: 2.1.6.088
6
6
  platform: ruby
7
7
  authors:
8
8
  - Le1t0