Skip to content

Commit

Permalink
Merge branch 'release/3.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
razorsedge committed Mar 20, 2015
2 parents 7599dd1 + ffc8fed commit e8d0c9d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec', '~> 2.0', :require => false
gem 'rspec-puppet', '~> 2.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'puppet-lint', '>= 1.1.0', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ Global network setting (IPv6 enabled):
ipv6networking => true,
}

Global network setting with IPv6 enabled with optional default device for IPv6 traffic:

class { 'network::global':
ipv6gateway => '123:4567:89ab:cdef:123:4567:89ab:1',
ipv6networking => true,
ipv6defaultdev => 'eth1',
}


Normal interface - static (minimal):

network::if::static { 'eth0':
Expand Down Expand Up @@ -216,7 +225,7 @@ Normal interface - VLAN - static (minimal):
Notes
-----

* Runs under Puppet 2.6 and later.
* Runs under Puppet 2.7 and later.
* Only works with RedHat-ish systems.
* Read /usr/share/doc/initscripts-*/sysconfig.txt for underlying details.
* Read /usr/share/doc/kernel-doc-*/Documentation/networking/bonding.txt for underlying details.
Expand All @@ -229,7 +238,7 @@ Notes
* There is currently no IPv6 support in this module.
* network::route requires the referenced device to also be defined via network::if or network::bond.
* For VLANs to work, `Class['network::global']` must have parameter `vlan` set to `yes`.
* To enable ipv6 you have to set both `ipv6networking` in `Class['network::global']` to `true` and `ipv6init` in `network::if::static` to `true`.
* To enable IPv6 you have to set both `ipv6networking` in `Class['network::global']` to `true` and `ipv6init` in `network::if::static` to `true`.

Issues
------
Expand All @@ -243,7 +252,7 @@ TODO
----

* Support /etc/sysconfig/network-scripts/rule-\<interface-name\>
* Support for IPv6.
* Expand support for IPv6.
* Support for more than Ethernet links.
* Testing of VLAN support (it should Just Work(TM)).

Expand Down
11 changes: 4 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'

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", "vender/**/*.pp"]
Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
end

PuppetSyntax.exclude_paths = ["spec/**/*", "pkg/**/*", "vender/**/*"]
PuppetSyntax.hieradata_paths = ["**/data/**/*.yaml", "hieradata/**/*.yaml", "hiera*.yaml"]
4 changes: 4 additions & 0 deletions manifests/global.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# Overrides $gateway in network::global. Must have
# $gateway defined in network::if or network::bond.
# $ipv6gateway - optional - Sets the default gateway for the IPv6 address - IPv6 must be enabled
# $ipv6defaultdev - optional - Determines the device to use as the default gateway
# for IPV6 traffic.
# $nisdomain - optional - Configures the NIS domainname.
# $vlan - optional - yes|no to enable VLAN kernel module
# $ipv6networking - optional - enables / disables IPv6 globally
Expand All @@ -37,6 +39,7 @@
# gateway => '1.2.3.1',
# gatewaydev => 'eth0',
# ipv6gateway => '123:4567:89ab:cdef:123:4567:89ab:1',
# ipv6defaultdev => 'eth0',
# nisdomain => 'domain.tld',
# vlan => 'yes',
# ipv6networking => true,
Expand All @@ -60,6 +63,7 @@
$gateway = '',
$gatewaydev = '',
$ipv6gateway = '',
$ipv6defaultdev = '',
$nisdomain = '',
$vlan = '',
$ipv6networking = false,
Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "razorsedge-network",
"version": "3.3.0",
"version": "3.4.0",
"author": "razorsedge",
"summary": "Manage RedHat/Fedora traditional network configuration.",
"summary": "Manage RedHat traditional network configuration via static and dhcp configuration of normal and bonded interfaces as well as bridges and VLANs.",
"license": "Apache-2.0",
"project_page": "https://github.com/razorsedge/puppet-network",
"issues_url": "https://github.com/razorsedge/puppet-network/issues",
"source": "https://github.com/razorsedge/puppet-network.git",
"tags": [ "RHEL", "rhel", "CentOS", "OEL", "fedora" ],
"tags": [ "network", "networking" ],
"dependencies": [
{
"name": "puppetlabs/stdlib",
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/network_global_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
:nozeroconf => 'yes',
:ipv6networking => true,
:ipv6gateway => '123:4567:89ab:cdef:123:4567:89ab:1',
:ipv6defaultdev => 'eth3',
}
end
let :facts do {
Expand All @@ -137,6 +138,7 @@
'NETWORKING=yes',
'NETWORKING_IPV6=yes',
'IPV6_DEFAULTGW=123:4567:89ab:cdef:123:4567:89ab:1',
'IPV6_DEFAULTDEV=eth3',
'HOSTNAME=myHostname',
'GATEWAY=1.2.3.4',
'GATEWAYDEV=eth2',
Expand Down
2 changes: 2 additions & 0 deletions templates/network.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ NETWORKING=yes
<% else %>NETWORKING_IPV6=yes
<% if [email protected]? %>IPV6_DEFAULTGW=<%= @ipv6gateway %>
<% end -%>
<% if [email protected]? %>IPV6_DEFAULTDEV=<%= @ipv6defaultdev %>
<% end -%>
<% end -%>
<% if [email protected]? %>HOSTNAME=<%= @hostname %>
<% else %>HOSTNAME=<%= scope.lookupvar('::fqdn') %>
Expand Down
1 change: 1 addition & 0 deletions tests/global.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
nozeroconf => 'yes',
ipv6networking => true,
ipv6gateway => '123:4567:89ab:cdef:123:4567:89ab:1',
ipv6defaultdev => 'eth1',
}

0 comments on commit e8d0c9d

Please sign in to comment.