knife-ec-backup 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9bb8bf0b0970f56877b16c760ca52bbe2f269a2
4
- data.tar.gz: 1ba9f4c918a5d5ba9986ad5f23288d3e8fa8c2f8
3
+ metadata.gz: 3fad4ec82781e7da3dd1840b1827f816a25f7960
4
+ data.tar.gz: 79264356094f42b1558b909d319d9f3987cd7f8b
5
5
  SHA512:
6
- metadata.gz: 8d8edd393349d5b6d5216dfcceec083ef06ce8105a1aca3592197b14d24f3cdf37735dfaca95165579a13e0a14c9db7d721f1bda118eca9b175a175f74cc603f
7
- data.tar.gz: 7fac688c2e45cb6247a632c5033e49265913691bc15bd9b2183a8d9f8635081facb72264d98357e357e9a44b677a9ccda1c52f841d755dbed5fa9f3a0c2d7493
6
+ metadata.gz: 36efea0e1e19967126c6f3d5ab6e3cdd8e1d5dc63314bc6dfc5249e9a6f6fc5489b31d6036bc417c258039d2a8538ffa095ea54d7aeebee604e3a8bac6bdb906
7
+ data.tar.gz: bc35eeee11ab6064590f2366e89955361d4a2c588d870c74808e08e3ec943e662768640489a03973eee4b5478d66b03d89221faa4a3ea9ba271e713ec46c5747
@@ -76,8 +76,14 @@ class Chef
76
76
  exit 1
77
77
  else
78
78
  running_config ||= JSON.parse(File.read("/etc/opscode/chef-server-running.json"))
79
- config[:sql_user] ||= running_config['private_chef']['postgresql']['sql_user']
80
- config[:sql_password] ||= running_config['private_chef']['postgresql']['sql_password']
79
+ # Latest versions of chef server put the database info under opscode-erchef.sql_user
80
+ hash_key = if running_config['private_chef']['opscode-erchef'].has_key? sql_user
81
+ 'opscode-erchef'
82
+ else
83
+ 'postgresql'
84
+ end
85
+ config[:sql_user] ||= running_config['private_chef'][hash_key]['sql_user']
86
+ config[:sql_password] ||= running_config['private_chef'][hash_key]['sql_password']
81
87
  end
82
88
  end
83
89
  end
@@ -1,3 +1,3 @@
1
1
  module KnifeECBackup
2
- VERSION = '2.0.4'
2
+ VERSION = '2.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-ec-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Keiser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-09 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel