{"id":16709282,"url":"https://github.com/mrlesmithjr/ansible-config-interfaces","last_synced_at":"2025-03-21T20:32:54.546Z","repository":{"id":36026499,"uuid":"40322295","full_name":"mrlesmithjr/ansible-config-interfaces","owner":"mrlesmithjr","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-01T03:44:34.000Z","size":62,"stargazers_count":36,"open_issues_count":0,"forks_count":37,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-01T09:34:02.701Z","etag":null,"topics":["ansible","bond","bridge"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrlesmithjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2015-08-06T19:07:25.000Z","updated_at":"2024-06-10T09:55:27.000Z","dependencies_parsed_at":"2023-12-21T15:37:30.058Z","dependency_job_id":"80123167-6056-429e-bc13-9c5747c03354","html_url":"https://github.com/mrlesmithjr/ansible-config-interfaces","commit_stats":{"total_commits":58,"total_committers":6,"mean_commits":9.666666666666666,"dds":0.1724137931034483,"last_synced_commit":"8ee5dfefe0969e3e57b3f19ce7d56255999930d8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-config-interfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-config-interfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-config-interfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrlesmithjr%2Fansible-config-interfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrlesmithjr","download_url":"https://codeload.github.com/mrlesmithjr/ansible-config-interfaces/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244866071,"owners_count":20523459,"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":["ansible","bond","bridge"],"created_at":"2024-10-12T20:04:22.570Z","updated_at":"2025-03-21T20:32:54.220Z","avatar_url":"https://github.com/mrlesmithjr.png","language":"Jinja","funding_links":["https://www.buymeacoffee.com/mrlesmithjr"],"categories":[],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n**Table of Contents** _generated with [DocToc](https://github.com/thlorenz/doctoc)_\n\n- [ansible-config-interfaces](#ansible-config-interfaces)\n  - [Requirements](#requirements)\n  - [Role Variables](#role-variables)\n  - [Dependencies](#dependencies)\n  - [Example Playbook](#example-playbook)\n  - [Examples](#examples)\n    - [Example (standard) `/etc/network/interfaces`:](#example-standard-etcnetworkinterfaces)\n    - [Example (Open vSwitch) `/etc/network/interfaces`:](#example-open-vswitch-etcnetworkinterfaces)\n  - [License](#license)\n  - [Author Information](#author-information)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# ansible-config-interfaces\n\nAn [Ansible](https://www.ansible.com) role to configure network interfaces\n\n- Define dhcp, static, and manual settings\n- Create VLAN, bonds, bridges, and interfaces\n- Create Open vSwitch bridges, bonds, and interfaces\n\n## Requirements\n\nSee [Example Playbook](#example-playbook) for examples of how to define specific\nnetwork configurations.\n\n\u003e NOTE: If creating Open vSwitch configurations you will need to use the [ansible-openvswitch](https://github.com/mrlesmithjr/ansible-openvswitch) [Ansible](https://www.ansible.com) role\n\n## Role Variables\n\n[defaults/main.yml](defaults/main.yml)\n\n## Dependencies\n\nIf interface is wireless you will need to define as such as well as provide the\nSSID and key.\n\n## Example Playbook\n\n[Example Playbook](playbook.yml)\n\n## Examples\n\n### Example (standard) `/etc/network/interfaces`\n\n```bash\n# Ansible managed\n# Any changes made here will be lost\n\nauto lo\niface lo inet loopback\n\n########## Network Interfaces\nauto enp0s3\niface enp0s3 inet dhcp\n  pre-up sleep 2\n\nauto enp0s8\niface enp0s8 inet static\n  address 192.168.250.10\n  netmask 255.255.255.0\n\n# bond0 member\nauto enp0s9\niface enp0s9 inet manual\n  bond_master bond0\n\n# bond0 member\nauto enp0s10\niface enp0s10 inet manual\n  bond_master bond0\n\n# br0 member\nauto enp0s16\niface enp0s16 inet manual\n\n########## End of Network Interfaces\n\n########## Network Bonds\n# Bond Group 0\nauto bond0\niface bond0 inet static\n  address 192.168.1.10\n  netmask 255.255.255.0\n  bond_slaves enp0s9 enp010\n  bond_primary enp0s9\n  bond_mode active-backup\n  bond_miimon 100\n\n########## End of Network Bonds\n\n\n########## Network Bridges\n# Bridge 0\nauto br0\niface br0 inet static\n  address 192.168.1.11\n  netmask 255.255.255.0\n  bridge_stp off\n  bridge_fd 0\n  bridge_ports enp0s16\n\n########## End of Network Bridges\n\ndns-nameservers 8.8.8.8 8.8.4.4\ndns-search test.vagrant.local\n```\n\n### Example (Open vSwitch) `/etc/network/interfaces`\n\n```bash\n# Ansible managed\n# Any changes made here will be lost\n\nauto lo\niface lo inet loopback\n\n########## Network Interfaces\nauto enp0s3\niface enp0s3 inet dhcp\n  pre-up sleep 2\n\nauto enp0s8\niface enp0s8 inet static\n  address 192.168.250.10\n  netmask 255.255.255.0\n\n########## End of Network Interfaces\n\n\n\n\n########## OVS Bonds\n# OVS Bond\nallow-vmbr0 bond0\niface bond0 inet manual\n  ovs_bridge vmbr0\n  ovs_type OVSBond\n  ovs_bonds enp0s9 enp0s10\n  ovs_options bond_mode=active-backup lacp=off\n\n########## End of OVS Bonds\n\n########## OVS Bridges\n# OVS Bridge\nauto vmbr0\nallow-ovs vmbr0\niface vmbr0 inet manual\n  ovs_type OVSBridge\n  ovs_ports bond0 vlan1\n\n########## End of OVS Bridges\n\n########## OVS Interfaces\n# VLAN1\nallow-vmbr0 vlan1\niface vlan1 inet static\n  address 192.168.250.100\n  netmask 255.255.255.0\n  ovs_bridge vmbr0\n  ovs_type OVSIntPort\n\n########## End of OVS Interfaces\n\ndns-nameservers 8.8.8.8 8.8.4.4\ndns-search test.vagrant.local\n```\n\n## License\n\nMIT\n\n## Author Information\n\nLarry Smith Jr.\n\n- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)\n- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)\n- [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com)\n\n\u003ca href=\"https://www.buymeacoffee.com/mrlesmithjr\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-config-interfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrlesmithjr%2Fansible-config-interfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrlesmithjr%2Fansible-config-interfaces/lists"}