mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
rename ip-address to ip_address
Signed-off-by: Kerry Vance <vancelot@osuosl.org> Signed-off-by: Kerry Vance <vancelot@osuosl.org>
This commit is contained in:
parent
3454c830a7
commit
540515f796
1 changed files with 7 additions and 3 deletions
|
@ -20,7 +20,7 @@ module Inspec::Resources
|
|||
|
||||
EXAMPLE
|
||||
|
||||
%w{ domain fqdn ip-address short }.each do |opt|
|
||||
%w{ domain fqdn ip_address short }.each do |opt|
|
||||
define_method(opt.to_sym) do
|
||||
hostname(opt)
|
||||
end
|
||||
|
@ -35,7 +35,7 @@ module Inspec::Resources
|
|||
" -f"
|
||||
when "d", "domain"
|
||||
" -d"
|
||||
when "i", "ip-address"
|
||||
when "i", "ip_address"
|
||||
" -I"
|
||||
when "s", "short"
|
||||
" -s"
|
||||
|
@ -44,7 +44,11 @@ module Inspec::Resources
|
|||
end
|
||||
inspec.command("hostname#{opt}").stdout.chomp
|
||||
elsif os.windows?
|
||||
inspec.powershell("$env:computername").stdout.chomp
|
||||
if !opt.nil?
|
||||
skip_resource "The `sys_info.hostname` resource is not supported with that option on your OS."
|
||||
else
|
||||
inspec.powershell("$env:computername").stdout.chomp
|
||||
end
|
||||
else
|
||||
skip_resource "The `sys_info.hostname` resource is not supported on your OS yet."
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue