-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from redBorder/improvement/fix_lint
Improvement/fix lint
- Loading branch information
Showing
5 changed files
with
99 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# | ||
# Cookbook Name:: snmp | ||
# Attributes:: default | ||
# | ||
# Cookbook:: snmp | ||
# Attributes:: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,67 @@ | ||
name "snmp" | ||
maintainer "Eric G. Wolfe" | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Installs/Configures snmp on redhat, centos, ubuntu, debian" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "0.1.2" | ||
name 'snmp' | ||
maintainer 'Eric G. Wolfe' | ||
maintainer_email '[email protected]' | ||
license 'Apache-2.0' | ||
description 'Installs/Configures snmp on redhat, centos, ubuntu, debian' | ||
version '0.1.2' | ||
|
||
recipe "snmp", "Installs and configures snmpd" | ||
|
||
%w{ ubuntu debian redhat centos scientific fedora }.each do |os| | ||
%w(ubuntu debian redhat centos scientific fedora).each do |os| | ||
supports os | ||
end | ||
|
||
attribute "snmp", | ||
:display_name => "SNMP", | ||
:description => "Hash of SNMP attributes", | ||
:type => "hash" | ||
|
||
attribute "snmp/service", | ||
:display_name => "SNMPD", | ||
:description => "SNMP Daemon name", | ||
:calculated => true | ||
attribute 'snmp', | ||
display_name: 'SNMP', | ||
description: 'Hash of SNMP attributes', | ||
type: 'hash' | ||
|
||
attribute "snmp/community", | ||
:display_name => "Community String", | ||
:description => "Community String, defaults to public", | ||
:default => "public", | ||
:required => "recommended" | ||
attribute 'snmp/service', | ||
display_name: 'SNMPD', | ||
description: 'SNMP Daemon name', | ||
calculated: true | ||
|
||
attribute "snmp/syslocationVirtual", | ||
:display_name => "syslocation Virtual", | ||
:description => "syslocation for Virtual Machines", | ||
:default => "Virtual Server", | ||
:required => "optional" | ||
attribute 'snmp/community', | ||
display_name: 'Community String', | ||
description: 'Community String, defaults to public', | ||
default: 'public', | ||
required: 'recommended' | ||
|
||
attribute "snmp/syslocationPhysical", | ||
:display_name => "syslocation Physical", | ||
:description => "syslocation for Physical Machines", | ||
:default => "Server Room", | ||
:required => "optional" | ||
attribute 'snmp/syslocationVirtual', | ||
display_name: 'syslocation Virtual', | ||
description: 'syslocation for Virtual Machines', | ||
default: 'Virtual Server', | ||
required: 'optional' | ||
|
||
attribute "snmp/syscontact", | ||
:display_name => "syscontact", | ||
:description => "System Contact", | ||
:default => "Root <root@localhost>", | ||
:required => "optional" | ||
attribute 'snmp/syslocationPhysical', | ||
display_name: 'syslocation Physical', | ||
description: 'syslocation for Physical Machines', | ||
default: 'Server Room', | ||
required: 'optional' | ||
|
||
attribute "snmp/trapcommunity", | ||
:display_name => "trapcommunity", | ||
:description => "SNMP Trap Community", | ||
:default => "public", | ||
:required => "optional" | ||
attribute 'snmp/syscontact', | ||
display_name: 'syscontact', | ||
description: 'System Contact', | ||
default: 'Root <root@localhost>', | ||
required: 'optional' | ||
|
||
attribute "snmp/trapsinks", | ||
:display_name => "trapsinks", | ||
:description => "Trapsink hostnames for NMS systems", | ||
:type => "array" | ||
attribute 'snmp/trapcommunity', | ||
display_name: 'trapcommunity', | ||
description: 'SNMP Trap Community', | ||
default: 'public', | ||
required: 'optional' | ||
|
||
attribute "snmp/full_systemview", | ||
:display_name => "full_systemview", | ||
:description => "Enable full systemview for NMS systems", | ||
:default => "false", | ||
:required => "recommended" | ||
attribute 'snmp/trapsinks', | ||
display_name: 'trapsinks', | ||
description: 'Trapsink hostnames for NMS systems', | ||
type: 'array' | ||
|
||
attribute "snmp/install_utils", | ||
:display_name => "install_utils", | ||
:description => "Enable installation of SNMP utilities, like snmpwalk", | ||
:default => "false", | ||
:required => "optional" | ||
attribute 'snmp/full_systemview', | ||
display_name: 'full_systemview', | ||
description: 'Enable full systemview for NMS systems', | ||
default: 'false', | ||
required: 'recommended' | ||
|
||
attribute 'snmp/install_utils', | ||
display_name: 'install_utils', | ||
description: 'Enable installation of SNMP utilities, like snmpwalk', | ||
default: 'false', | ||
required: 'optional' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
# | ||
# Cookbook Name:: snmp | ||
# Cookbook:: snmp | ||
# Recipe:: default | ||
# | ||
|
||
snmp_config "Configure snmp" do | ||
hostname node["hostname"] | ||
cdomain "redborder.cluster" | ||
action :add | ||
end | ||
snmp_config 'Configure snmp' do | ||
hostname node['hostname'] | ||
cdomain 'redborder.cluster' | ||
action :add | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
# Cookbook Name:: snmp | ||
# | ||
# Cookbook:: snmp | ||
# Resource:: config | ||
# | ||
|
||
actions :add, :remove | ||
default_action :add | ||
|
||
attribute :community, :kind_of => String, :default => "redborder" | ||
attribute :cdomain, :kind_of => String, :default => "redborder.cluster" | ||
attribute :hostname, :kind_of => String, :default => "localhost" | ||
attribute :snmp_username, :kind_of => String, :default => "redborder" | ||
attribute :snmp_pass, :kind_of => String, :default => "redborderP@ssw0rd" | ||
attribute :config_dir, :kind_of => String, :default => "/etc/snmp" | ||
attribute :community, kind_of: String, default: 'redborder' | ||
attribute :cdomain, kind_of: String, default: 'redborder.cluster' | ||
attribute :hostname, kind_of: String, default: 'localhost' | ||
attribute :snmp_username, kind_of: String, default: 'redborder' | ||
attribute :snmp_pass, kind_of: String, default: 'redborderP@ssw0rd' | ||
attribute :config_dir, kind_of: String, default: '/etc/snmp' |