rundock-plugin-operation-itamae 0.1.1 → 0.1.2

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: 2010cef61246f61f4a878f4b8070ce7ec3ddd058
4
- data.tar.gz: cc00a387057c70085701d46f96044191330de5a3
3
+ metadata.gz: 2b429255d4f8e9e4b4b0e6678c80f243dd118918
4
+ data.tar.gz: 64ef23ea60e8ee08e570370e67375dfa37723e28
5
5
  SHA512:
6
- metadata.gz: 5d88ecc29bcc80247037e3b289a15e43dcbc0f8ac13f8ea4c3852e4cc3a695d1fe2343de7e91f32427ba6ec3fe205d3b1a679599391599ff8524f92f3942672d
7
- data.tar.gz: 0ef1f8369ac66c766802725c00f80c75e9cf26724ab279de628bbbd6d7c7cf5635ddf04f58f328bc9b8e2db01ec80ef599122712f20f34e638fc8d57c1d43ad1
6
+ metadata.gz: d78377d56d7f61e62b0d6f99a4eb1689f48334078357acc69bebdc2910cd6073f8c7b7569d07918c842540ac71baa508b8190a760ae7df1a5f0a95897ea4c117
7
+ data.tar.gz: 6cf74a382fa32936388aa0b1b91c0c9ed04440e461a7f58e836246323253890499483d4781c2535cf4a369817073037dba7b317bfddf27afa302bc287905c5d0
data/.gitignore CHANGED
@@ -8,6 +8,7 @@
8
8
  /test/tmp/
9
9
  /test/version_tmp/
10
10
  /tmp/
11
+ Gemfile.lock
11
12
 
12
13
  ## Specific to RubyMotion:
13
14
  .dat*
@@ -28,10 +28,29 @@ module Rundock
28
28
  arg.each { |k, v| options[k] = v } if arg.is_a?(Hash)
29
29
  end
30
30
 
31
- options[:log_level] = 'info' unless options[:log_level]
32
- ::Itamae::Logger.level = ::Logger.const_get(options[:log_level].upcase)
33
- ::Itamae::Logger.formatter.colored = options[:color]
34
- ::Itamae::Runner.run(recipe_files, :local, options)
31
+ unless recipe_files.empty?
32
+ options.merge!(filter_itamae_ssh_opts(attributes[:nodeinfo])) if attributes[:nodeinfo]
33
+ options[:log_level] = 'info' unless options[:log_level]
34
+ options[:color] = true unless options[:color]
35
+ ::Itamae::Logger.level = ::Logger.const_get(options[:log_level].upcase)
36
+ ::Itamae::Logger.formatter.colored = options[:color]
37
+
38
+ if options[:host] == 'localhost' || options[:host] == '127.0.1'
39
+ type = :local
40
+ else
41
+ type = :ssh
42
+ end
43
+
44
+ ::Itamae::Runner.run(recipe_files, type, options)
45
+ end
46
+ end
47
+
48
+ private
49
+
50
+ def filter_itamae_ssh_opts(options)
51
+ opts = {}
52
+ [:host, :user, :key, :port].each { |o| opts[o] = options[o] }
53
+ opts
35
54
  end
36
55
  end
37
56
  end
@@ -2,7 +2,7 @@ module Rundock
2
2
  module Plugin
3
3
  module Operation
4
4
  module Itamae
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
8
8
  end
data/scenario_sample.yml CHANGED
@@ -1,14 +1,14 @@
1
1
  - node: anyhost-01
2
2
  itamae:
3
- - /tmp/nginx.rb
4
- - /tmp/mysql.rb
5
- - node_json: /tmp/attr.js
3
+ - /local/path/to/nginx.rb
4
+ - /local/path/to/mysql.rb
5
+ - node_json: /local/path/to/attr.js
6
6
  log_level: info
7
7
  ---
8
8
  anyhost-01:
9
- host: 172.30.4.225
9
+ host: 192.168.10.11
10
10
  ssh_opts:
11
- port: 10022
12
- user: hiraishi_yosuke
13
- key: ~/.ssh/id_rsa_hiraishi
11
+ port: 22
12
+ user: anyuser
13
+ key: ~/.ssh/id_rsa
14
14
  ---
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rundock-plugin-operation-itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiracy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,6 @@ files:
91
91
  - .rspec
92
92
  - .travis.yml
93
93
  - Gemfile
94
- - Gemfile.lock
95
94
  - LICENSE
96
95
  - README.md
97
96
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,71 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rundock-plugin-operation-itamae (0.1.0)
5
- itamae
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ansi (1.5.0)
11
- diff-lcs (1.2.5)
12
- hashie (3.4.2)
13
- itamae (1.4.3)
14
- ansi
15
- hashie
16
- schash (~> 0.1.0)
17
- specinfra (>= 2.37.0, < 3.0.0)
18
- thor
19
- multi_json (1.11.2)
20
- net-scp (1.2.1)
21
- net-ssh (>= 2.6.5)
22
- net-ssh (2.9.2)
23
- net-telnet (0.1.1)
24
- rake (10.4.2)
25
- rspec (3.3.0)
26
- rspec-core (~> 3.3.0)
27
- rspec-expectations (~> 3.3.0)
28
- rspec-mocks (~> 3.3.0)
29
- rspec-core (3.3.2)
30
- rspec-support (~> 3.3.0)
31
- rspec-expectations (3.3.1)
32
- diff-lcs (>= 1.2.0, < 2.0)
33
- rspec-support (~> 3.3.0)
34
- rspec-its (1.2.0)
35
- rspec-core (>= 3.0.0)
36
- rspec-expectations (>= 3.0.0)
37
- rspec-mocks (3.3.2)
38
- diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.3.0)
40
- rspec-support (3.3.0)
41
- rundock (0.2.5)
42
- ansi
43
- net-ssh
44
- specinfra (>= 2.31.0, < 3.0.0)
45
- thor
46
- schash (0.1.2)
47
- serverspec (2.20.0)
48
- multi_json
49
- rspec (~> 3.0)
50
- rspec-its
51
- specinfra (~> 2.38)
52
- sfl (2.2)
53
- specinfra (2.40.0)
54
- net-scp
55
- net-ssh (~> 2.7)
56
- net-telnet
57
- sfl
58
- thor (0.19.1)
59
-
60
- PLATFORMS
61
- ruby
62
-
63
- DEPENDENCIES
64
- bundler (~> 1.9)
65
- rake (~> 10.0)
66
- rundock
67
- rundock-plugin-operation-itamae!
68
- serverspec (~> 2.1)
69
-
70
- BUNDLED WITH
71
- 1.10.6