Skip to content

Commit

Permalink
Exit the recipe when on VMs or cloud nodes
Browse files Browse the repository at this point in the history
No point wasting resources running a smart daemon on these
  • Loading branch information
tas50 committed Jan 29, 2014
1 parent fbd7276 commit 7477c6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs/Configures smartmontools'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.0.1'
version '1.0.2'

supports 'debian', '>= 6.0'
supports 'ubuntu', '>= 10.04'
Expand Down
3 changes: 3 additions & 0 deletions recipes/default.rb
Expand Up @@ -17,6 +17,9 @@
# limitations under the License.
#

# exit if running on virtualized or cloud nodes.
return if node['virtualization']['role'] == 'guest' || node['cloud']

service_name = value_for_platform_family(
'rhel' => { 'default' => 'smartd' },
'default' => 'smartmontools'
Expand Down

0 comments on commit 7477c6f

Please sign in to comment.