networkmanager
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.21.0 < 8.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'jednoprsak-networkmanager', '1.0.0-rc1'
Learn more about managing modules with a PuppetfileDocumentation
networkmanager
Table of Contents
Description
You want to use our module because noone written another module for using keyfiles yet (October 18, 2022) and we from Prague Academy of Physics computing farm geeks are the best underground team ever, but stop flexing. I hope that this module will be usable for you. The module installs NetworkManager, configures its config file, starts service, creates keyfiles and pushes them inside NetworkManager via nmcli(and nmcli pushes them inside via dbus). It provides a few defined resources to create keyfiles for connnection(dhcp, static, ipv6, ipv4), bridge, bond, vlan and fallback defined resource for user defined keyfile.
Setup
What networkmanager module affects OPTIONAL
Brain and mood.
Setup Requirements OPTIONAL
You need a few additional libraries:
- hash2stuff
- sdtlib
Beginning with networkmanager
When you want to begin with NetworkManager, you need to be clever as devil, but our module will help you create keyfiles and push them inside that oven of hell.
Usage
class {
'networkmanager':
erase_unmanaged_keyfiles => true,
no_auto_default => true;
}
networkmanager::ifc::connection {
'z1':
ensure => present,
mac_address => '52:54:00:4d:2a:56',
ipv4_method => 'manual',
ipv4_address => '192.168.1.12/24,192.168.1.1',
ipv4_dns => '8.8.8.8;8.8.4.4;',
ipv6_method => 'manual',
ipv6_dhcp_duid => '00:22:66::52:54:10:44:2a:56'
ipv6_address => 'IPV6ADDRESS/PREFIX',
ipv6_dns => 'IPV6DNS1;IPV6DNS2;'
ipv6_gateway => 'IPV6GATEWAY';
}
networkmanager::ifc::bridge {
'bridge1':
ensure => present,
ipv6_method => 'ignore';
}
networkmanager::ifc::bridge::slave {
'bridge1-slave':
ensure => present,
mac_address => 'MM:AA:CC:MM:AA:CC', #here insert MAC address string.
master => 'bridge1';
}
networkmanager::ifc::bond {
'bondmaster2':
ensure => present,
ipv4_method => 'auto',
ipv6_method => 'ignore',
bond_mode => 'balance-xor'
additional_config => {
bond => {
miimon => '100',
}
};
}
networkmanager::ifc::bond::slave {
'bondslaveens8':
ensure => present,
mac_address => 'MAC_ADDRESS',
master => 'bondmaster2';
}
networkmanager::ifc::bond::slave {
'bondslaveens9':
ensure => present,
mac_address => 'MAC_ADDRESS',
master => 'bondmaster2';
}
Connection id length
The connection.id
parametre is limited by deafult to 15 charactes, because is by deafult used also as the interface name.
The interface name has upper limit of 15 characters set by kernel.
You can override this limit by setting the $networkmanager::max_length_of_connection_id to the value you like but then you need to set, where applicable, the connection.interface-name
to something what is less than 16 characters long.
Contact
CHANGELOG
any -> 1.0.0-rc1
-
Breaking changes:
- the $ifc_name parametre was renamed to $interface_name
- connection $id is by default limited to 3 to 15 characters to comply with the usage of this as deafult a value for the $interface_name which is limited to maximum of 15 character by the kernel you can change this behaviour by adjusting the $networkmanager::max_length_of_connection_id, then you need to supply the $iterface_name where applicable if you use $id > 15 characters
- The parametres got their limits adjusted so it will expect right types (eg. $vlan_id was accepted as string before, now it must be integer of 1 to 4095 including), the chages are almost everywhere so check your code (it will just fail to compile)
-
New features:
- added the untested support for the Debian
Dependencies
- puppetlabs/stdlib (>= 4.13.1 < 9.0.0)
- mmckinst/hash2stuff (>= 1.2.1 < 2.0.0)
Copyright 2022 Lukáš Míča 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.