beaker-task_helper 1.7.0 → 1.7.1

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: c5e1f77202c02443ad7f4dae1bdee8f41426c71d
4
- data.tar.gz: 6860f600dad781f5c5ecf22eb40d6e2752645bcc
3
+ metadata.gz: f6d8f14889f34d8454b6b7c3edacb8ccd5fef898
4
+ data.tar.gz: c5cb9326641991c2ba2c7802aa9d8e8275f0de37
5
5
  SHA512:
6
- metadata.gz: 49827637f04073ab7b64dd142db921e5d613d473338ab158ce416aa05d1e648ac66741163d4fba5f1b55f60c9dfe901324801b46e9fba76df60cee26faefd50c
7
- data.tar.gz: 7b80cd400d1b07e0790636c2d1587358a642b386bcbd29138152f8a2c905375205b986f105fba27792832916f9fe933f29e8923d711f2d6bd19ea83742baba5d
6
+ metadata.gz: 6e5001028885a733480e6b98b2afcccc5bea4dfec1aedd8415bc71642583f16f2ea5c0286cd1617e6486e9d619a780658f03d390da73149cee389aaed2681a56
7
+ data.tar.gz: 58af4abbbf3eab20be6c31e43b96cefec8da0d67c14876490c689f1fee7705aebdb52253cfdd46df1c936ec5dd4f232f0a4acc67df740195af13bcac151f72de
@@ -74,13 +74,24 @@ INSTALL_BOLT_PP
74
74
  #
75
75
  #TODO: Implement on windows
76
76
  def setup_ssh_access(task_runner, nodes)
77
- ssh_dir_path = '/root/.ssh/'
78
- rsa_pub_path = "#{ssh_dir_path}/id_rsa.pub"
79
-
80
- on task_runner, "ssh-keygen -f #{ssh_dir_path}/id_rsa -t rsa -N ''"
81
- public_key = on(task_runner, "cat #{rsa_pub_path}").stdout
82
- create_remote_file(nodes, "#{rsa_pub_path}", public_key)
83
- on(nodes, "cat #{rsa_pub_path} >> #{ssh_dir_path}/authorized_keys")
77
+ task_runner_ssh_dir = '/root/.ssh'
78
+ task_runner_rsa_pub = "#{task_runner_ssh_dir}/id_rsa.pub"
79
+ on task_runner, "ssh-keygen -f #{task_runner_ssh_dir}/id_rsa -t rsa -N ''"
80
+ public_key = on(task_runner, "cat #{task_runner_rsa_pub}").stdout
81
+
82
+ nodes.each do |node|
83
+ case node.platform
84
+ when /solaris-10/
85
+ ssh_dir_path = '/.ssh/'
86
+ when /osx-1012/
87
+ ssh_dir_path = '/var/root/.ssh/'
88
+ else
89
+ ssh_dir_path = '/root/.ssh'
90
+ end
91
+ rsa_pub_path = "#{ssh_dir_path}/id_rsa.pub"
92
+ create_remote_file(node, "#{rsa_pub_path}", public_key)
93
+ on(node, "cat #{rsa_pub_path} >> #{ssh_dir_path}/authorized_keys")
94
+ end
84
95
  end
85
96
 
86
97
  def run_task(task_name:, params: nil, password: DEFAULT_PASSWORD, host: nil, format: 'human')
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module TaskHelper
3
- VERSION = '1.7.0'.freeze
3
+ VERSION = '1.7.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-task_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop