module Chef::Sugar::Cloud

Public Instance Methods

azure?(node) click to toggle source

Return true if the current current node is in Azure

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 127
def azure?(node)
  node.key?('azure')
end
cloud?(node) click to toggle source

Return true if the current current node is in “the cloud”.

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 30
def cloud?(node)
  node.key?('cloud')
end
cloudstack?(node) click to toggle source

Return true if the current current node is in Cloudstack

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 115
def cloudstack?(node)
  node.key?('cloudstack')
end
digitalocean?(node) click to toggle source

Return true if the current current node is in DigitalOcean

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 139
def digitalocean?(node)
  node.key?('digital_ocean')
end
ec2?(node) click to toggle source

Return true if the current current node is in EC2

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 42
def ec2?(node)
  node.key?('ec2')
end
euca?(node)
Alias for: eucalyptus?
eucalyptus?(node) click to toggle source

Return true if the current current node is in Eucalyptus

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 78
def eucalyptus?(node)
  node.key?('eucalyptus')
end
Also aliased as: euca?
gce?(node) click to toggle source

Return true if the current current node is in GCE

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 54
def gce?(node)
  node.key?('gce')
end
linode?(node) click to toggle source

Return true if the current current node is in Linode

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 91
def linode?(node)
  node.key?('linode')
end
openstack?(node) click to toggle source

Return true if the current current node is in Openstack

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 103
def openstack?(node)
  node.key?('openstack')
end
rackspace?(node) click to toggle source

Return true if the current current node is in Rackspace

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 66
def rackspace?(node)
  node.key?('rackspace')
end
softlayer?(node) click to toggle source

Return true if the current current node is in SoftLayer

@param [Chef::Node] node

the node to check

@return [Boolean]

# File lib/chef/sugar/cloud.rb, line 151
def softlayer?(node)
  node.key?('softlayer')
end