-
-
Notifications
You must be signed in to change notification settings - Fork 136
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 #56 from mhaskel/modernize
Modernize Module
- Loading branch information
Showing
19 changed files
with
170 additions
and
99 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 +1,9 @@ | ||
pkg/ | ||
Gemfile.lock | ||
vendor/ | ||
spec/fixtures/ | ||
.vagrant/ | ||
.bundle/ | ||
coverage/ | ||
.idea/ | ||
*.iml |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
language: ruby | ||
bundler_args: --without system_tests | ||
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" | ||
matrix: | ||
fast_finish: true | ||
include: | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
notifications: | ||
email: false |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
source ENV['GEM_SOURCE'] || "https://rubygems.org" | ||
|
||
group :development, :unit_tests do | ||
gem 'rake', :require => false | ||
gem 'rspec-core', '3.1.7', :require => false | ||
gem 'rspec-puppet', '~> 1.0', :require => false | ||
gem 'puppetlabs_spec_helper', :require => false | ||
gem 'puppet-lint', :require => false | ||
gem 'simplecov', :require => false | ||
gem 'puppet_facts', :require => false | ||
gem 'json', :require => false | ||
end | ||
|
||
group :system_tests do | ||
gem 'beaker-rspec', :require => false | ||
gem 'serverspec', :require => false | ||
end | ||
|
||
if facterversion = ENV['FACTER_GEM_VERSION'] | ||
gem 'facter', facterversion, :require => false | ||
else | ||
gem 'facter', :require => false | ||
end | ||
|
||
if puppetversion = ENV['PUPPET_GEM_VERSION'] | ||
gem 'puppet', puppetversion, :require => false | ||
else | ||
gem 'puppet', :require => false | ||
end | ||
|
||
# vim:ft=ruby |
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,2 +1,10 @@ | ||
require 'rake' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
require 'puppet-lint/tasks/puppet-lint' | ||
|
||
PuppetLint.configuration.fail_on_warnings = true | ||
PuppetLint.configuration.send('relative') | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.send('disable_class_inherits_from_params_class') | ||
PuppetLint.configuration.send('disable_documentation') | ||
PuppetLint.configuration.send('disable_single_quote_string_with_variables') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] |
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,22 +1,24 @@ | ||
# == Class: dhcp::failover | ||
# | ||
class dhcp::failover ( | ||
$role = 'primary', | ||
$address = $ipaddress, | ||
$peer_address, | ||
$role = 'primary', | ||
$address = $::ipaddress, | ||
$port = '519', | ||
$max_response_delay = '30', | ||
$max_unacked_updates = '10', | ||
$mclt = '300', | ||
$load_split = '128', | ||
$load_balance = '3', | ||
$omapi_key = '' | ||
$omapi_key = '', | ||
) { | ||
|
||
include dhcp::params | ||
|
||
$dhcp_dir = $dhcp::params::dhcp_dir | ||
|
||
concat::fragment { 'dhcp-conf-failover': | ||
target => "${dhcp_dir}/dhcpd.conf", | ||
content => template('dhcp/dhcpd.conf.failover.erb'), | ||
} | ||
|
||
} |
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
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,38 +1,42 @@ | ||
# == Class: dhcp::params | ||
# | ||
class dhcp::params { | ||
|
||
case $::osfamily { | ||
default: { | ||
fail("${::osfamily} not spupprted in ${module_name}") | ||
} | ||
debian: { | ||
'debian': { | ||
if ( $::operatingsystem == 'ubuntu' ) { | ||
if versioncmp($::operatingsystemrelease, '12.04') >= 0 { | ||
if (versioncmp($::operatingsystemrelease, '12.04') >= 0) { | ||
$dhcp_dir = '/etc/dhcp' | ||
} else { | ||
$dhcp_dir = '/etc/dhcp3' | ||
} | ||
} else { | ||
$dhcp_dir = '/etc/dhcp' | ||
} | ||
$packagename = 'isc-dhcp-server' | ||
$servicename = 'isc-dhcp-server' | ||
$packagename = 'isc-dhcp-server' | ||
$servicename = 'isc-dhcp-server' | ||
$package_provider = undef | ||
} | ||
darwin: { | ||
$dhcp_dir = '/opt/local/etc/dhcp' | ||
$packagename = 'dhcp' | ||
$packageprov = 'macports' | ||
$servicename = 'org.macports.dhcpd' | ||
'darwin': { | ||
$dhcp_dir = '/opt/local/etc/dhcp' | ||
$packagename = 'dhcp' | ||
$servicename = 'org.macports.dhcpd' | ||
$package_provider = 'macports' | ||
} | ||
freebsd: { | ||
$dhcp_dir = '/usr/local/etc' | ||
$packagename = 'net/isc-dhcp42-server' | ||
$servicename = 'isc-dhcpd' | ||
'freebsd': { | ||
$dhcp_dir = '/usr/local/etc' | ||
$packagename = 'net/isc-dhcp42-server' | ||
$servicename = 'isc-dhcpd' | ||
$package_provider = undef | ||
} | ||
redhat: { | ||
$dhcp_dir = '/etc/dhcp' | ||
$packagename = 'dhcp' | ||
$servicename = 'dhcpd' | ||
'redhat': { | ||
$dhcp_dir = '/etc/dhcp' | ||
$packagename = 'dhcp' | ||
$servicename = 'dhcpd' | ||
$package_provider = undef | ||
} | ||
default: { | ||
fail('dhcp is supported on the following OS\'s: Debian, Ubuntu, Darwin, FreeBSD, RedHat, Fedora, and CentOS.') | ||
} | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.