{"id":15013948,"url":"https://github.com/voxpupuli/puppet-network","last_synced_at":"2025-05-15T07:06:35.740Z","repository":{"id":2286478,"uuid":"3244052","full_name":"voxpupuli/puppet-network","owner":"voxpupuli","description":"Types and providers to manage network interfaces","archived":false,"fork":false,"pushed_at":"2025-03-19T20:16:02.000Z","size":895,"stargazers_count":65,"open_issues_count":46,"forks_count":107,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-04T07:27:14.243Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/network","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2012-01-23T03:48:51.000Z","updated_at":"2025-03-19T20:16:04.000Z","dependencies_parsed_at":"2023-12-23T17:16:29.069Z","dependency_job_id":"1285701f-2782-4842-9648-1e5c1e8d66fe","html_url":"https://github.com/voxpupuli/puppet-network","commit_stats":{"total_commits":551,"total_committers":70,"mean_commits":7.871428571428571,"dds":0.6987295825771325,"last_synced_commit":"ebfee0c6c945103b3df86aa9b34d7c8a018d05e0"},"previous_names":["adrienthebo/puppet-network"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253858704,"owners_count":21974983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module"],"created_at":"2024-09-24T19:44:59.443Z","updated_at":"2025-05-15T07:06:35.648Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# Network module for Puppet\n\n[![Build Status](https://github.com/voxpupuli/puppet-network/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-network/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-network/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-network/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/network.svg)](https://forge.puppetlabs.com/puppet/network)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/network.svg)](https://forge.puppetlabs.com/puppet/network)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/network.svg)](https://forge.puppetlabs.com/puppet/network)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/network.svg)](https://forge.puppetlabs.com/puppet/network)\n[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-network)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-network.svg)](LICENSE)\n\n## Overview\n\nManage non-volatile network and route configuration.\n\n## Usage\n\nInterface configuration\n\n```puppet\nnetwork_config { 'eth0':\n  ensure  =\u003e 'present',\n  family  =\u003e 'inet',\n  method  =\u003e 'dhcp',\n  onboot  =\u003e 'true',\n  hotplug =\u003e 'true',\n  options =\u003e {'pre-up' =\u003e 'sleep 2'},\n}\n\nnetwork_config { 'lo':\n  ensure =\u003e 'present',\n  family =\u003e 'inet',\n  method =\u003e 'loopback',\n  onboot =\u003e 'true',\n}\n\nnetwork_config { 'eth1':\n  ensure    =\u003e 'present',\n  family    =\u003e 'inet',\n  ipaddress =\u003e '169.254.0.1',\n  method    =\u003e 'static',\n  netmask   =\u003e '255.255.0.0',\n  onboot    =\u003e 'true',\n}\n```\n\nRoute configuration\n\nRoute resources should be named in CIDR notation. If not, they will not be\nproperly mapped to existing routes and puppet will apply them on every run.\nDefault routes should be named 'default'.\n\n  For Debian:\n\n```puppet\n# default route\nnetwork_route { 'default':\n  ensure    =\u003e 'present',\n  network   =\u003e 'default',\n  netmask   =\u003e '0.0.0.0',\n  gateway   =\u003e '172.18.6.2',\n  interface =\u003e 'enp3s0f0',\n}\n\n# specific route\nnetwork_route { '172.17.67.0/24':\n  ensure    =\u003e 'present',\n  gateway   =\u003e '172.18.6.2',\n  interface =\u003e 'vlan200',\n  netmask   =\u003e '255.255.255.0',\n  options   =\u003e 'table 200',\n}\n```\n\n  For RedHat Enterprise:\n\n```puppet\nnetwork_route { '172.17.67.0/24':\n  ensure    =\u003e 'present',\n  gateway   =\u003e '10.0.2.2',\n  interface =\u003e 'eth0',\n  netmask   =\u003e '255.255.255.0',\n  network   =\u003e '172.17.67.0',\n  options   =\u003e 'table 200',\n}\nnetwork_route { 'default':\n  ensure    =\u003e 'present',\n  gateway   =\u003e '10.0.2.2',\n  interface =\u003e 'eth0',\n  netmask   =\u003e '0.0.0.0',\n  network   =\u003e 'default'\n}\nnetwork_route { '10.0.0.2':\n  ensure    =\u003e 'present',\n  network   =\u003e 'local',\n  interface =\u003e 'eth0',\n  options   =\u003e 'proto 66 scope host table local',\n}\n```\n\n  For SLES:\n\n```puppet\nnetwork_route { 'default':\n  ensure    =\u003e 'present',\n  gateway   =\u003e '10.0.2.2',\n  interface =\u003e 'eth0',\n  netmask   =\u003e '0.0.0.0',\n  network   =\u003e 'default'\n}\n```\n\nCreate resources on the fly with the `puppet resource` command:\n\n    root@debian-6:~# puppet resource network_config eth1 ensure=present family=inet method=static ipaddress=169.254.0.1 netmask=255.255.0.0\n    notice: /Network_config[eth1]/ensure: created\n    network_config { 'eth1':\n      ensure    =\u003e 'present',\n      family    =\u003e 'inet',\n      ipaddress =\u003e '169.254.0.1',\n      method    =\u003e 'static',\n      netmask   =\u003e '255.255.0.0',\n      onboot    =\u003e 'true',\n    }\n\n    # puppet resource network_route 23.23.42.0 ensure=present netmask=255.255.255.0 interface=eth0 gateway=192.168.1.1\n    notice: /Network_route[23.23.42.0]/ensure: created\n    network_route { '23.23.42.0':\n      ensure    =\u003e 'present',\n      gateway   =\u003e '192.168.1.1',\n      interface =\u003e 'eth0',\n      netmask   =\u003e '255.255.255.0',\n      options   =\u003e 'table 200',\n    }\n\n## Dependencies\n\nThis module requires the FileMapper mixin, available at \u003chttps://github.com/voxpupuli/puppet-filemapper\u003e.\nThe network_config type requires the Boolean mixin, available at \u003chttps://github.com/adrienthebo/puppet-boolean\u003e.\n\nThe debian routes provider requires the package [ifupdown-extra](http://packages.debian.org/search?suite=all\u0026section=all\u0026arch=any\u0026searchon=names\u0026keywords=ifupdown-extra).\n`ifupdown-extra` can be installed automatically using the `network` class.\nTo use it, include it like so in your manifests:\n\n```puppet\ninclude 'network'\n```\n\nThis class also provides fine-grained control over which packages to install and\nhow to install them. The documentation for the parameters exposed can be found\n[here](https://github.com/voxpupuli/puppet-network/blob/master/manifests/init.pp).\n\nBonding on Debian requires the package [ifenslave](https://packages.debian.org/search?suite=all\u0026section=all\u0026arch=any\u0026searchon=names\u0026keywords=ifenslave),\nwhich is installed automatically when a bond is defined. This package was\nrenamed in Debian 9, and therefore bonding does not work on Debian\nversions prior to 9.\n\nNote: you may also need to update your master's plugins (run on your puppet master):\n\n    puppet agent -t --noop\n\nOr on puppet 3.8.7/4.x:\n\n    puppet plugin download\n\n- - -\n\n## Contact\n\n* Source code: \u003chttps://github.com/voxpupuli/puppet-network\u003e\n* Issue tracker: \u003chttps://github.com/voxpupuli/puppet-network/issues\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-network/lists"}