amoeba_deploy_tools 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fa4f6fa2afc5dfeae61bde67b2f13430455729f
4
- data.tar.gz: 87152f1003360be115d599f9bb73c9cdd1c32ba3
3
+ metadata.gz: d3f980e6e6ba277bcb0ec532447e3ecd8faf2ab0
4
+ data.tar.gz: 29ccc3de90e5ae4728868e8b4bf20e44ce17f499
5
5
  SHA512:
6
- metadata.gz: a678118362ebb6ddf7f02d1bbd3724e914df90ec0750569408e7b2fc5073cbe05d120498d6b52ff14c0061817847151141a2632042954ff62fbf7fc6193fc7f3
7
- data.tar.gz: 9512aa23c2f1f17cb20e4c4915e86f4f461f7846aa803ac638a578eb38a4a6468804baac4cef1c5e51c2a3cde5f5ea80b6a555ac174539b760ab7cf1f0f833c0
6
+ metadata.gz: 14aafd9a75e2dd529ced4d371a94d404d1da48086f0b73387c190f8a70270496266c3a34c143e34b5f015bbb81b1e1bd40856656c96105f50b803f7a621b4a53
7
+ data.tar.gz: 16a5e21efa56aa69aadd234e671a80955d3e75615fcefb5881988899e3102a64d7a8dbe548bdc9c256132822ec847fd318bf6f45af115fd16d3a16bf5151e00d
@@ -49,7 +49,22 @@ module AmoebaDeployTools
49
49
  force_deployer unless remote_node.deployment_.user
50
50
 
51
51
  raw_json = ssh_run('sudo cat ~deploy/node.json', silent: true)
52
+ # Store the remote_node databag
52
53
  data_bag(:nodes)[node.name] = JSON.load raw_json
54
+
55
+ # Now check and see if we are missing the private_key on this node
56
+ private_key = remote_node.private_key || 'default'
57
+ private_key_raw = remote_node.private_key_raw
58
+
59
+ if private_key_raw
60
+ # If we don't already have the private_key in our config, let's add it
61
+ unless config.private_keys_[private_key]
62
+ logger.info "Saving new private key `#{private_key}` to config file..."
63
+ config.private_keys![private_key] = private_key_raw
64
+ config.save
65
+ end
66
+ end
67
+
53
68
  end
54
69
 
55
70
  desc 'list', 'Show available nodes in kitchen'
@@ -1,3 +1,3 @@
1
1
  module AmoebaDeployTools
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amoeba_deploy_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Jabbour