formatron 0.1.13 → 0.1.14
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/formatron/chef/keys.rb +3 -0
- data/lib/formatron/util/ssh.rb +2 -1
- data/lib/formatron/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: 549a567b83515e35a2ea69ed7c8b3ab8cc820382
|
|
4
|
+
data.tar.gz: dcd7078bac7e6e134de753a65129a261afa672d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e820a4d7134921c97fb114146134e1ecb0c13765ac0f21e1d028a546414a12ccd3693722ff0df140282b49dc6ba6e716692aac9b431d08ae000f1abe8d729b59
|
|
7
|
+
data.tar.gz: 30addbe444dde872d6f4b54ca32806f39e95891010c9a00fd213d3e5b70a86355b234c58fbedc4cfc392c7c0f1856006d87584fecba4561ecc8b0c5a7d3936fb
|
data/lib/formatron/chef/keys.rb
CHANGED
|
@@ -15,6 +15,7 @@ class Formatron
|
|
|
15
15
|
end
|
|
16
16
|
# rubocop:enable Metrics/ParameterLists
|
|
17
17
|
|
|
18
|
+
# rubocop:disable Metrics/MethodLength
|
|
18
19
|
def init
|
|
19
20
|
@directory = Dir.mktmpdir 'formatron-chef-server-keys-'
|
|
20
21
|
S3::ChefServerKeys.get(
|
|
@@ -26,7 +27,9 @@ class Formatron
|
|
|
26
27
|
directory: @directory
|
|
27
28
|
)
|
|
28
29
|
File.write ec2_key, @ec2_key
|
|
30
|
+
File.chmod 0600, ec2_key
|
|
29
31
|
end
|
|
32
|
+
# rubocop:enable Metrics/MethodLength
|
|
30
33
|
|
|
31
34
|
def user_key
|
|
32
35
|
S3::ChefServerKeys.user_pem_path directory: @directory
|
data/lib/formatron/util/ssh.rb
CHANGED
|
@@ -10,7 +10,8 @@ class Formatron
|
|
|
10
10
|
# rubocop:disable Metrics/AbcSize
|
|
11
11
|
def self.exec(hostname:, bastion_hostname:, user:, key:, command:)
|
|
12
12
|
proxy_command = Net::SSH::Proxy::Command.new(
|
|
13
|
-
"ssh -
|
|
13
|
+
"ssh -i #{key} -o StrictHostKeyChecking=no " \
|
|
14
|
+
"#{user}@#{bastion_hostname} -W %h:%p"
|
|
14
15
|
) unless hostname.eql? bastion_hostname
|
|
15
16
|
Net::SSH.start(
|
|
16
17
|
hostname,
|
data/lib/formatron/version.rb
CHANGED