{"id":16777301,"url":"https://github.com/githubixx/ansible-role-cni","last_synced_at":"2026-01-03T20:02:24.210Z","repository":{"id":39580722,"uuid":"405188067","full_name":"githubixx/ansible-role-cni","owner":"githubixx","description":"Ansible role to install CNI (Container Network Interface)","archived":false,"fork":false,"pushed_at":"2025-01-15T19:56:50.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-23T05:43:36.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/githubixx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSES/GPL-3.0-or-later.txt","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":"2021-09-10T19:12:14.000Z","updated_at":"2025-01-15T19:56:28.000Z","dependencies_parsed_at":"2024-12-02T18:41:17.179Z","dependency_job_id":null,"html_url":"https://github.com/githubixx/ansible-role-cni","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-cni","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-cni/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-cni/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubixx%2Fansible-role-cni/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubixx","download_url":"https://codeload.github.com/githubixx/ansible-role-cni/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243918630,"owners_count":20368745,"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":[],"created_at":"2024-10-13T07:24:19.074Z","updated_at":"2026-01-03T20:02:24.198Z","avatar_url":"https://github.com/githubixx.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (C) 2021-2025 Robert Wimmer\nSPDX-License-Identifier: GPL-3.0-or-later\n--\u003e\n\n# ansible-role-cni\n\nAnsible role to install [CNI - Container Network Interface](https://github.com/containernetworking/plugins). [CNI](https://www.cni.dev/) (Container Network Interface), a Cloud Native Computing Foundation project, consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers, along with a number of supported plugins. CNI concerns itself only with network connectivity of containers and removing allocated resources when the container is deleted. Because of this focus, CNI has a wide range of support and the specification is simple to implement.\n\n## Changelog\n\n**Change history:**\n\nSee full [CHANGELOG](https://github.com/githubixx/ansible-role-cni/blob/master/CHANGELOG.md)\n\n**Recent changes:**\n\n## 0.11.0+1.8.0\n\n- **Breaking**\n  - `meta/main.yml`: Change `min_ansible_version` to 2.15. Ansible 2.9 is end-of-life (EOL).\n\n- **UPDATE**\n  - update `cni_version` to `1.8.0`\n  - update `.gitignore`\n\n## 0.10.0+1.7.1\n\n- **UPDATE**\n  - update `cni_version` to `1.7.1`\n\n- **MOLECULE**\n  - Use `generic/arch` Vagrant box instead of `archlinux/archlinux` (no longer available)\n  - Install `openssl` package for Archlinux\n  - Removed Ubuntu 20.04 because reached end of life\n  - Removed 'Upgrade the whole system' task\n\n## 0.9.1+1.6.2\n\n- update `cni_version` to `1.6.2`\n\n## Role Variables\n\n```yaml\n# CNI plugin version\ncni_version: \"1.8.0\"\n\n# CNI binary directory\ncni_bin_directory: \"/opt/cni/bin\"\n\n# CNI configuration directory\ncni_conf_directory: \"/etc/cni/net.d\"\n\n# Directory to store the archive\ncni_tmp_directory: \"{{ lookup('env', 'TMPDIR') | default('/tmp', true) }}\"\n\n# Owner/group of \"CNI\" files/directories. If the variables are not set\n# the resulting binary will be owned by the current user.\ncni_owner: \"root\"\ncni_group: \"root\"\n\n# Specifies the permissions of the \"CNI\" binaries\ncni_binary_mode: \"0755\"\n\n# Operating system\n# Possible options: \"linux\", \"windows\"\ncni_os: \"linux\"\n\n# Processor architecture \"CNI\" should run on.\n# Other possible values: \"arm\", \"arm64\", \"mips64le\", \"ppc64le\", \"s390x\"\ncni_arch: \"amd64\"\n\n# Name of the archive file name\ncni_archive: \"cni-plugins-{{ cni_os }}-{{ cni_arch }}-v{{ cni_version }}.tgz\"\n\n# The CNI download URL (normally no need to change it)\ncni_url: \"https://github.com/containernetworking/plugins/releases/download/v{{ cni_version }}/{{ cni_archive }}\"\n\n# Restart \"kubelet\" service after \"CNI\" binaries or configuration have changed.\n# This handler expects a systemd service called \"kubelet.service\".\ncni_restart_kubelet: false\n```\n\n## TODO\n\n- Distribute CNI network configuration files (for [Cilium](https://cilium.io/) this is not needed as CNI files are created by Cilium)\n\n## Example Playbook\n\n```yaml\n- hosts: your-host\n  roles:\n    - githubixx.cni\n```\n\n## Testing\n\nThis role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-cni/tree/master/molecule/kvm).\n\nAfterwards molecule can be executed:\n\n```bash\nmolecule converge\n```\n\nThis will setup a few virtual machines (VM) with different supported Linux operating systems and installs `CNI`.\n\nTo run a few tests:\n\n```bash\nmolecule verify\n```\n\nTo clean up run\n\n```bash\nmolecule destroy\n```\n\n## License\n\nGNU GENERAL PUBLIC LICENSE Version 3\n\n## Author Information\n\n[http://www.tauceti.blog](http://www.tauceti.blog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-cni","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubixx%2Fansible-role-cni","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubixx%2Fansible-role-cni/lists"}