Module: ChefUtils::DSL::OS

Extended by:
OS
Includes:
Internal
Included in:
ChefUtils, OS
Defined in:
lib/chef-utils/dsl/os.rb

Instance Method Summary collapse

Instance Method Details

#darwin?(node = __getnode) ⇒ Boolean

Determine if the current node is Darwin.

Parameters:

  • node (Chef::Node) (defaults to: __getnode)

    the node to check

Returns:

  • (Boolean)

Since:

  • 15.5



51
52
53
# File 'lib/chef-utils/dsl/os.rb', line 51

def darwin?(node = __getnode)
  node["os"] == "darwin"
end

#linux?(node = __getnode) ⇒ Boolean

Determine if the current node is Linux.

Parameters:

  • node (Chef::Node) (defaults to: __getnode)

    the node to check

Returns:

  • (Boolean)

Since:

  • 15.5



40
41
42
# File 'lib/chef-utils/dsl/os.rb', line 40

def linux?(node = __getnode)
  node["os"] == "linux"
end