Module: Chef::Sugar::Platform
Constant Summary collapse
- PLATFORM_VERSIONS =
{ 'debian' => { 'squeeze' => '6.0', 'wheezy' => '7.0', 'jessie' => '8.0', }, 'linuxmint' => { 'olivia' => '15', 'nadia' => '14', 'maya' => '13', 'lisa' => '12', }, 'mac_os_x' => { 'lion' => '10.7', 'mountain_lion' => '10.8', 'mavericks' => '10.9', }, 'ubuntu' => { 'lucid' => '10.04', 'maverick' => '10.10', 'natty' => '11.04', 'oneiric' => '11.10', 'precise' => '12.04', 'quantal' => '12.10', 'raring' => '13.04', 'saucy' => '13.10', }, }
- COMPARISON_OPERATORS =
{ 'after' => ->(a, b) { a > b }, 'after_or_at' => ->(a, b) { a >= b }, '' => ->(a, b) { a == b }, 'before' => ->(a, b) { a < b }, 'before_or_at' => ->(a, b) { a <= b }, }
Instance Method Summary collapse
-
#amazon_linux?(node) ⇒ Boolean
(also: #amazon?)
Determine if the current node is amazon linux.
-
#centos?(node) ⇒ Boolean
Determine if the current node is centos.
-
#linux_mint?(node) ⇒ Boolean
(also: #mint?)
Determine if the current node is linux mint.
-
#oracle_linux?(node) ⇒ Boolean
(also: #oracle?)
Determine if the current node is oracle linux.
-
#redhat_enterprise_linux?(node) ⇒ Boolean
(also: #redhat_enterprise?)
Determine if the current node is redhat enterprise.
-
#scientific_linux?(node) ⇒ Boolean
(also: #scientific?)
Determine if the current node is scientific linux.
-
#ubuntu?(node) ⇒ Boolean
Determine if the current node is ubuntu.
Instance Method Details
#amazon_linux?(node) ⇒ Boolean Also known as: amazon?
Determine if the current node is amazon linux.
105 106 107 |
# File 'lib/chef/sugar/platform.rb', line 105 def amazon_linux?(node) node['platform'] == 'amazon' end |
#centos?(node) ⇒ Boolean
Determine if the current node is centos.
117 118 119 |
# File 'lib/chef/sugar/platform.rb', line 117 def centos?(node) node['platform'] == 'centos' end |
#linux_mint?(node) ⇒ Boolean Also known as: mint?
Determine if the current node is linux mint.
82 83 84 |
# File 'lib/chef/sugar/platform.rb', line 82 def linux_mint?(node) node['platform'] == 'linuxmint' end |
#oracle_linux?(node) ⇒ Boolean Also known as: oracle?
Determine if the current node is oracle linux.
128 129 130 |
# File 'lib/chef/sugar/platform.rb', line 128 def oracle_linux?(node) node['platform'] == 'oracle' end |
#redhat_enterprise_linux?(node) ⇒ Boolean Also known as: redhat_enterprise?
Determine if the current node is redhat enterprise.
152 153 154 |
# File 'lib/chef/sugar/platform.rb', line 152 def redhat_enterprise_linux?(node) node['platform'] == 'enterprise' end |
#scientific_linux?(node) ⇒ Boolean Also known as: scientific?
Determine if the current node is scientific linux.
140 141 142 |
# File 'lib/chef/sugar/platform.rb', line 140 def scientific_linux?(node) node['platform'] == 'scientific' end |
#ubuntu?(node) ⇒ Boolean
Determine if the current node is ubuntu.
94 95 96 |
# File 'lib/chef/sugar/platform.rb', line 94 def ubuntu?(node) node['platform'] == 'ubuntu' end |