Skip to content

darkwizard242/ansible-role-kubens

Repository files navigation

build-test release Ansible Role Maintainability Rating Reliability Rating Security Rating GitHub tag (latest SemVer) GitHub repo size

Ansible Role: kubens

Role to install (by default) kubens 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:

kubens_app: kubens
kubens_version: 0.9.5
kubens_os: linux
kubens_arch: x86_64
kubens_dl_url: https://github.com/ahmetb/kubectx/releases/download/v{{ kubens_version }}/{{ kubens_app }}_v{{ kubens_version }}_{{ kubens_os }}_{{ kubens_arch }}.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_arch 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.

- hosts: servers
  roles:
    - darkwizard242.kubens

For customizing behavior of role (i.e. specifying the desired kubens version) in ansible playbooks.

- 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.

- hosts: servers
  roles:
    - darkwizard242.kubens
  vars:
    kubens_bin_path: /bin/

License

MIT

Author Information

This role was created by Ali Muhammad.