Version information
released Mar 17th 2015
This version is compatible with:
- ,
This module has been deprecated by its author since Jan 4th 2021.
Start using this module
Documentation
attachmentgenie/network — version 1.1.3 Mar 17th 2015
Puppet Network Module
Module for configuring network interfaces.
Tested on Debian GNU/Linux 6.0 Squeeze and Ubuntu 10.4 LTS and 12.04 LTS with Puppet 2.6 and 2.7. Patches for other operating systems are welcome.
Usage
By including the network::interfaces
class you get a basic configuration
with only a loopback interface:
include network::interfaces
You can enable the eth0
interface configured with DHCP:
class { "network::interfaces":
interfaces => {
"eth0" => {
"method" => "dhcp",
}
},
auto => ["eth0"],
}
Or you can enable the eth0
interface with a static configuration:
class { "network::interfaces":
interfaces => {
"eth0" => {
"method" => "static",
"address" => "10.0.0.50",
"netmask" => "255.255.255.0",
"gateway" => "10.0.0.1",
}
},
auto => ["eth0"],
}
It's also possible to create two interfaces on the same ethernet device:
class { "network::interfaces":
interfaces => {
"eth0" => {
"method" => "static",
"address" => "10.0.0.50",
"netmask" => "255.255.255.0",
"gateway" => "10.0.0.1",
}
"eth0:1" => {
"method" => "static",
"address" => "10.0.0.60",
"netmask" => "255.255.255.0",
}
},
auto => ["eth0", "eth0:1"],
}
You can create pseudo interfaces which are useful for handling different wireless networks:
class { "network::interfaces":
interfaces => {
"work" => {
"method" => "dhcp",
"wpa-ssid" => "work-wlan",
"wpa-psk" => "supersecretkey",
}
"open" => {
"method" => "dhcp",
"wireless-essid" => "open-wlan",
}
},
mappings => {
"wlan0" => {
"script" => "guessnet-ifupdown",
"maps" => ["timeout: 5", "work"],
}
},
auto => ["wlan0"],
}
Dependencies
- puppetlabs/stdlib (>=2.2.1 <5.0.0)
Copyright (C) 2011 by Eivind Uggedal <eivind@uggedal.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.