formatron 0.1.13 → 0.1.14

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: 9795a44b8589bdc6c10aeb85ffededfda7ed9028
4
- data.tar.gz: 89e4cafbe9e79ba56aa66cb255a9889b52d79ef1
3
+ metadata.gz: 549a567b83515e35a2ea69ed7c8b3ab8cc820382
4
+ data.tar.gz: dcd7078bac7e6e134de753a65129a261afa672d2
5
5
  SHA512:
6
- metadata.gz: ecfd5445ba2697c7e106777780c4d6c4f21f2853b36f5f27b08482abe77ad49dfd11b6663a2912f65ca9c088010b238c35b1bb11e9995322f5580c6147ba6ac4
7
- data.tar.gz: e9c04aa19929a016bfaa461627fd6a0a47a6d646d2f3660e99f0807aa55da1c16f647e67dae5775893e5d79fe3629630a543ee83abcd0cef9ef216800ddee58f
6
+ metadata.gz: e820a4d7134921c97fb114146134e1ecb0c13765ac0f21e1d028a546414a12ccd3693722ff0df140282b49dc6ba6e716692aac9b431d08ae000f1abe8d729b59
7
+ data.tar.gz: 30addbe444dde872d6f4b54ca32806f39e95891010c9a00fd213d3e5b70a86355b234c58fbedc4cfc392c7c0f1856006d87584fecba4561ecc8b0c5a7d3936fb
@@ -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
@@ -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 -o StrictHostKeyChecking=no #{user}@#{bastion_hostname} -W %h:%p"
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,
@@ -1,4 +1,4 @@
1
1
  # add version to class
2
2
  class Formatron
3
- VERSION = '0.1.13'
3
+ VERSION = '0.1.14'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Halliday