specinfra 2.18.0 → 2.18.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 986714dbef8eb87fe3feeec2a68f47b3d54c93e7
4
- data.tar.gz: 462409f9a83ca31793a5878c39aebab6cd4d1843
3
+ metadata.gz: ab3820cc872b378eb1157615c60772812ecc51de
4
+ data.tar.gz: 3fe8b65314493d58539ae0bd98ee9e58c7fa00b1
5
5
  SHA512:
6
- metadata.gz: 247447e1066bfbb554f3da2d3b038e35f0f1b760158d3f21b374447095e4240d1656523706bb753a58ba5ea1887220c4ddd3f21fd73cc762ebf6602367425359
7
- data.tar.gz: 57c398cabc517e9df36f0775655c9555bda4ee0a21a0634102229f8bb2e0a027b6da570be93168e0116f468d698efbe84c1593d78c11746cb6053a2bf7a78cda
6
+ metadata.gz: 9a7b92a818a42e34dd8625edf47a4724794be578db5c8363bc3a8875b890545ac3fa63a8831bebd15e062986d0644127041a6abdfd6e9c974992e5e4b89d2457
7
+ data.tar.gz: 52d14b2b97959fe84c6529c1c6b335218c8f5394c60c0712924cc607e5caf041009db1314e5b0d40b22ba1837ddf0667efc87cdc7d09e84a908b728b5ac9f3db
@@ -93,6 +93,7 @@ require 'specinfra/command/aix'
93
93
  require 'specinfra/command/aix/base'
94
94
  require 'specinfra/command/aix/base/file'
95
95
  require 'specinfra/command/aix/base/group'
96
+ require 'specinfra/command/aix/base/host'
96
97
  require 'specinfra/command/aix/base/package'
97
98
  require 'specinfra/command/aix/base/port'
98
99
  require 'specinfra/command/aix/base/service'
@@ -0,0 +1,17 @@
1
+ class Specinfra::Command::Aix::Base::Host < Specinfra::Command::Base::Host
2
+ class << self
3
+ def check_is_resolvable(name, type)
4
+ if type == "dns"
5
+ %Q[lookup=$(nslookup -timeout=1 #{escape(name)} | grep -A1 'Name:' | grep Address | awk -F': ' '{print $2}'); if [ "$lookup" ]; then $(exit 0); else $(exit 1); fi]
6
+ elsif type == "hosts"
7
+ "grep -w -- #{escape(name)} /etc/hosts"
8
+ else
9
+ "host #{escape(name)}"
10
+ end
11
+ end
12
+
13
+ def get_ipaddress(name)
14
+ "host #{escape(name)} | awk '{print $3}'"
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.18.0"
2
+ VERSION = "2.18.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.0
4
+ version: 2.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-03 00:00:00.000000000 Z
11
+ date: 2015-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -141,6 +141,7 @@ files:
141
141
  - lib/specinfra/command/aix/base.rb
142
142
  - lib/specinfra/command/aix/base/file.rb
143
143
  - lib/specinfra/command/aix/base/group.rb
144
+ - lib/specinfra/command/aix/base/host.rb
144
145
  - lib/specinfra/command/aix/base/package.rb
145
146
  - lib/specinfra/command/aix/base/port.rb
146
147
  - lib/specinfra/command/aix/base/service.rb