module ChefUtils::DSL::Cloud
Public Instance Methods
Determine if the current node is running in Alibaba Cloud
@param [Chef::Node] node the node to check @since 17.0
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 45 def alibaba?(node = __getnode) node.key?("alibaba") end
Determine if the current node is running in Microsoft Azure.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 124 def azure?(node = __getnode) node.key?("azure") end
Determine if the current node is running in a known cloud.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 33 def cloud?(node = __getnode) # cloud is always present, but nil if not on a cloud !node["cloud"].nil? end
Determine if the current node is running in DigitalOcean.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 135 def digital_ocean?(node = __getnode) node.key?("digital_ocean") end
Determine if the current node is running in AWS EC2.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 56 def ec2?(node = __getnode) node.key?("ec2") end
Determine if the current node is running in Eucalyptus.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 89 def eucalyptus?(node = __getnode) node.key?("eucalyptus") end
Determine if the current node running in Google Compute Engine (GCE).
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 67 def gce?(node = __getnode) node.key?("gce") end
Determine if the current node is running in Linode.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 102 def linode?(node = __getnode) node.key?("linode") end
Determine if the current node is running in OpenStack.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 113 def openstack?(node = __getnode) node.key?("openstack") end
Determine if the current node is running in Rackspace.
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 78 def rackspace?(node = __getnode) node.key?("rackspace") end
Determine if the current node is running in SoftLayer (IBM Cloud
).
@param [Chef::Node] node the node to check @since 15.8
@return [Boolean]
# File lib/chef-utils/dsl/cloud.rb, line 148 def softlayer?(node = __getnode) node.key?("softlayer") end