intellium.rancher.rancher_kubeconfig (0.0.7) — module

Obtain kubeconfig for given cluster

| "added in version" 0.0.6 of intellium.rancher"

Authors: Wouter Moeken (@intellium)

Install collection

Install with ansible-galaxy collection install intellium.rancher:==0.0.7


Add to requirements.yml

  collections:
    - name: intellium.rancher
      version: 0.0.7

Description

This module allows you to fetch the content of the kubeconfig for the given rancher cluster


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Fetch config
- name: Obtain kubeconfig for test cluster
  intellium.rancher.rancher_kubeconfig:
    host: rancher.example.com
    token: "{{ login_out['token'] }}"
    cluster_name: test
    full_response: true
    validate_certs: false
  register: kubeconfig_out

Inputs

    
host:
    aliases:
    - rancher_host
    description: Hostname of rancher system
    required: true
    type: str

token:
    aliases:
    - rancher_token
    description: Token used for authentication
    required: false
    type: str

password:
    aliases:
    - rancher_password
    description: Password for user/pass login instead of token
    required: false
    type: str

username:
    aliases:
    - rancher_username
    description: Username for user/pass login instead of token
    required: false
    type: str

cluster_name:
    aliases:
    - rancher_cluster
    description: Name of the cluster in rancher to operate on
    required: true
    type: str

full_response:
    description: Whether to return full api response
    required: false
    type: bool

validate_certs:
    default: true
    description: Verify SSL certificates
    required: false
    type: bool

Outputs

full_response:
  description: The full API response of the last request
  returned: optional
  type: dict
kubeconfig:
  description: content of the kubeconfig file
  returned: always
  type: dict