https://github.com/darkwizard242/ansible-role-kubens
Ansible role for 'kubens'. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-kubens
ansible ansible-galaxy ansible-role kubens kubernetes kubernetes-namespaces
Last synced: 3 months ago
JSON representation
Ansible role for 'kubens'. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-kubens
- Owner: darkwizard242
- License: mit
- Created: 2022-01-03T00:05:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-25T20:59:08.000Z (11 months ago)
- Last Synced: 2024-12-28T02:05:10.783Z (5 months ago)
- Topics: ansible, ansible-galaxy, ansible-role, kubens, kubernetes, kubernetes-namespaces
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/kubens
- Size: 34.2 KB
- Stars: 1
- 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-kubens/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-kubens/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-kubens) [](https://sonarcloud.io/dashboard?id=ansible-role-kubens) [](https://sonarcloud.io/dashboard?id=ansible-role-kubens)  
# Ansible Role: kubens
Role to install (_by default_) [kubens](https://github.com/ahmetb/kubectx) on **Debian/Ubuntu** and **EL** systems. **kubens** is a tool to switch between Kubernetes namespaces easily.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`):
### Variables list:
```yaml
kubens_app: kubens
kubens_version: 0.9.5
kubens_os: "{{ ansible_system | lower }}"
kubens_architecture_map:
amd64: x86_64
arm: arm64
x86_64: x86_64
armv6l: armv6
armv7l: armv7
aarch64: arm64
32-bit: "386"
64-bit: x86_64
kubens_dl_url: https://github.com/ahmetb/kubectx/releases/download/v{{ kubens_version }}/{{ kubens_app }}_v{{ kubens_version }}_{{ kubens_os }}_{{ kubens_architecture_map[ansible_architecture] }}.tar.gz
kubens_bin_path: /usr/local/bin
kubens_file_owner: root
kubens_file_group: root
kubens_file_mode: '0755'
```### Variables table:
Variable | Description
----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------
kubens_app | Defines the app to install i.e. **kubens**
kubens_version | Defined to dynamically fetch the desired version to install. Defaults to: **0.9.5**
kubens_osarch | Used to specify OS type.
kubens_architecture_map | Used to specify OS architecture type.
kubens_dl_url | Defines URL to download the kubens binary from.
kubens_bin_path | Defined to dynamically set the appropriate path to store kubens binary into. Defaults to (as generally available on any user's PATH): **/usr/local/bin**
kubens_file_owner | Owner for the binary file of kubens.
kubens_file_group | Group for the binary file of kubens.
kubens_file_mode | Mode for the binary file of kubens.## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **kubens**) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.kubens
```For customizing behavior of role (i.e. specifying the desired **kubens** version) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.kubens
vars:
kubens_version: 0.9.3
```For customizing behavior of role (i.e. placing binary of **kubens** package in different location) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.kubens
vars:
kubens_bin_path: /bin/
```## License
[MIT](https://github.com/darkwizard242/ansible-role-kubens/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).