Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dependencies #36

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,19 @@ The resource title. Sets the interfaces name, for example 'ib0'.

##### <a name="ipaddr"></a>`ipaddr`

Data type: `Stdlib::Compat::Ip_address`
Data type: `Stdlib::IP::Address`

The IPADDR for the infiniband interface.

##### <a name="netmask"></a>`netmask`

Data type: `Stdlib::Compat::Ip_address`
Data type: `Stdlib::IP::Address`

The NETMASK for the infiniband interface.

##### <a name="gateway"></a>`gateway`

Data type: `Optional[Stdlib::Compat::Ip_address]`
Data type: `Optional[Stdlib::IP::Address]`

The GATEWAY for the infiniband interface.

Expand Down
45 changes: 26 additions & 19 deletions manifests/interface.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
# The bonding options to use for this bonding interface
#
define infiniband::interface (
Stdlib::Compat::Ip_address $ipaddr,
Stdlib::Compat::Ip_address $netmask,
Optional[Stdlib::Compat::Ip_address] $gateway = undef,
Stdlib::IP::Address $ipaddr,
Stdlib::IP::Address $netmask,
Optional[Stdlib::IP::Address] $gateway = undef,
Enum['present', 'absent'] $ensure = 'present',
Boolean $enable = true,
Enum['yes', 'no'] $connected_mode = 'yes',
Expand Down Expand Up @@ -71,46 +71,53 @@

# Setup interfaces for the slaves
$bonding_slaves.each |String $ifname| {
network::interface { $ifname:
network_config { $ifname:
ensure => $ensure,
enable => $enable,
onboot => $onboot,
type => 'InfiniBand',
master => $name,
slave => 'yes',
nm_controlled => $_nm_controlled,
mtu => $mtu,
options_extra_redhat => $options_extra_redhat,
method => 'static',
hotplug => 'false',
options => {
'TYPE' => 'Infiniband',
'NM_CONTROLLED' => $_nm_controlled,
}
}
}

# Setup the bonding interface
network::interface { $name:
network_config { $name:
ensure => $ensure,
enable => $enable,
onboot => $onboot,
type => 'Bond',
ipaddress => $ipaddr,
netmask => $netmask,
gateway => $gateway,
bonding_master => 'yes',
bonding_opts => $bonding_opts,
nm_controlled => $_nm_controlled,
mtu => $mtu,
method => 'static',
hotplug => 'false',
options => {
'TYPE' => 'Infiniband',
'NM_CONTROLLED' => $_nm_controlled,
'GATEWAY' => $gateway,
}
}

} else {
network::interface { $name:
network_config { $name:
ensure => $ensure,
enable => $enable,
onboot => $onboot,
type => 'InfiniBand',
ipaddress => $ipaddr,
netmask => $netmask,
gateway => $gateway,
nm_controlled => $_nm_controlled,
mtu => $mtu,
options_extra_redhat => $options_extra_redhat,
method => 'static',
hotplug => 'false',
options => {
'TYPE' => 'Infiniband',
'NM_CONTROLLED' => $_nm_controlled,
'GATEWAY' => $gateway,
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.1 <8.0.0"
"version_requirement": ">= 4.13.1 <10.0.0"
},
{
"name": "herculesteam/augeasproviders_shellvar",
"version_requirement": ">=2.0.0 <5.0.0"
},
{
"name": "puppet/yum",
"version_requirement": ">= 1.0.0 <6.0.0"
"version_requirement": ">= 1.0.0 <8.0.0"
},
{
"name": "example42/network",
Expand Down