https://github.com/darkwizard242/ansible-role-cni
Ansible role for CNI plugins. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-cni
ansible ansible-galaxy ansible-role cni cni-plugins
Last synced: 2 months ago
JSON representation
Ansible role for CNI plugins. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-cni
- Owner: darkwizard242
- License: mit
- Created: 2021-11-15T16:35:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T21:12:31.000Z (7 months ago)
- Last Synced: 2024-10-17T08:19:10.677Z (7 months ago)
- Topics: ansible, ansible-galaxy, ansible-role, cni, cni-plugins
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/cni
- Size: 36.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/darkwizard242/ansible-role-cni/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-cni/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-cni) [](https://sonarcloud.io/dashboard?id=ansible-role-cni) [](https://sonarcloud.io/dashboard?id=ansible-role-cni)  
# Ansible Role: cni
Role to install (_by default_) [cni](https://github.com/containernetworking/plugins) plugins on **Debian/Ubuntu** and **EL** systems to support Kubernetes Cluster setup.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`):
### Variables list:
```yaml
cni_app: cni
cni_version: 1.6.2
cni_os: linux
cni_arch: amd64
cni_dl_url: "https://github.com/containernetworking/plugins/releases/download/v{{ cni_version }}/cni-plugins-{{ cni_os }}-{{ cni_arch }}-v{{ cni_version }}.tgz"
cni_plugins_dir: /opt/cni/bin
cni_plugins_dir_mode: '0755'
```### Variables table:
Variable | Description
-------------------- | --------------------------------------------------------------------------------------------------------------------------------
cni_app | Defines the app to install i.e. **cni**
cni_version | Defined to dynamically fetch the desired version to install. Defaults to: **1.6.2**
cni_os | Defines OS type. Defaults to: **linux**
cni_arch | Defines os architecture. Used for obtaining the correct type of binaries based on OS System Architecture. Defaults to: **amd64**
cni_dl_url | Defines URL to download the cni binaries archive from.
cni_plugins_dir | Defined to dynamically set the appropriate path to store cni binaries into.
cni_plugins_dir_mode | Mode for the binaries file of cni.## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **cni**) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.cni
```For customizing behavior of role (i.e. specifying the desired **cni** version) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.cni
vars:
cni_version: 1.0.0
```For customizing behavior of role (i.e. setting filemode for binaries of **cni**) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.cni
vars:
cni_file_mode: '0775'
```## License
[MIT](https://github.com/darkwizard242/ansible-role-cni/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/)