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 +4 -4
- data/lib/amoeba_deploy_tools/commands/node.rb +15 -0
- data/lib/amoeba_deploy_tools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3f980e6e6ba277bcb0ec532447e3ecd8faf2ab0
|
|
4
|
+
data.tar.gz: 29ccc3de90e5ae4728868e8b4bf20e44ce17f499
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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'
|