Module: ChefUtils::DSL::Backend

Includes:
Internal
Defined in:
lib/chef-utils/dsl/backend.rb

Instance Method Summary collapse

Instance Method Details

#local_mode?Boolean

Determine if the backend is local

Parameters:

  • node (Chef::Node)

    the node to check

Returns:

  • (Boolean)


12
13
14
# File 'lib/chef-utils/dsl/backend.rb', line 12

def local_mode?
  node["platform_backend"] == "local"
end

#target_mode?Boolean

Determine if the backend is remote

Parameters:

  • node (Chef::Node)

    the node to check

Returns:

  • (Boolean)


22
23
24
# File 'lib/chef-utils/dsl/backend.rb', line 22

def target_mode?
  node["platform_backend"] != "local"
end