From f0dacc083c4963a4cc31d91e4a513c8e80df14f4 Mon Sep 17 00:00:00 2001 From: Timothy Appnel Date: Thu, 8 Oct 2020 16:32:54 -0400 Subject: [PATCH] Embedded docs clarifications and refinements. (#258) * Another embedded docs clarifications in k8s_rollback * Embedded docs clarification in helm_pljugin_info * Embedded docs clarification in k8s * More embedded docs clarification in k8s inventory plugin * Fixed markdown formatting to RST in k8s_rollback --- plugins/inventory/k8s.py | 5 +++-- plugins/modules/helm_plugin_info.py | 2 +- plugins/modules/helm_repository.py | 9 +++++++-- plugins/modules/k8s.py | 7 +------ plugins/modules/k8s_rollback.py | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/plugins/inventory/k8s.py b/plugins/inventory/k8s.py index 50554575..ede54375 100644 --- a/plugins/inventory/k8s.py +++ b/plugins/inventory/k8s.py @@ -14,8 +14,9 @@ DOCUMENTATION = ''' short_description: Kubernetes (K8s) inventory source description: - - Fetch containers and services for one or more clusters - - Groups by cluster name, namespace, namespace_services, namespace_pods, and labels + - Fetch containers and services for one or more clusters. + - Groups by cluster name, namespace, namespace_services, namespace_pods, and labels. + - Uses the kubectl connection plugin to access the Kubernetes cluster. - Uses k8s.(yml|yaml) YAML configuration file to set parameter values. options: diff --git a/plugins/modules/helm_plugin_info.py b/plugins/modules/helm_plugin_info.py index 951f1ed9..26664b43 100644 --- a/plugins/modules/helm_plugin_info.py +++ b/plugins/modules/helm_plugin_info.py @@ -39,7 +39,7 @@ EXAMPLES = r''' - name: Gather Helm plugin info community.kubernetes.helm_plugin_info: -- name: Gather Helm plugin info +- name: Gather Helm env plugin info community.kubernetes.helm_plugin_info: plugin_name: env ''' diff --git a/plugins/modules/helm_repository.py b/plugins/modules/helm_repository.py index cc0cadbb..d8722e63 100644 --- a/plugins/modules/helm_repository.py +++ b/plugins/modules/helm_repository.py @@ -11,7 +11,7 @@ DOCUMENTATION = r''' --- module: helm_repository -short_description: Add and remove Helm repository +short_description: Manage Helm repositories. version_added: "0.11.0" @@ -59,7 +59,7 @@ options: repo_state: choices: ['present', 'absent'] description: - - Desirated state of repository. + - Desired state of repository. required: false default: present aliases: [ state ] @@ -71,6 +71,11 @@ EXAMPLES = r''' community.kubernetes.helm_repository: name: stable repo_url: https://kubernetes-charts.storage.googleapis.com + +- name: Add Red Hat Helm charts repository + community.kubernetes.helm_repository: + name: redhat-charts + repo_url: https://redhat-developer.github.com/redhat-helm-charts ''' RETURN = r''' # ''' diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index 0c57c3e1..aacf3b5c 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -179,17 +179,12 @@ EXAMPLES = r''' state: present definition: "{{ lookup('file', '/testing/deployment.yml') | from_yaml }}" -- name: Read definition file from the Ansible controller file system after Jinja templating - community.kubernetes.k8s: - state: present - definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}" - - name: Read definition template file from the Ansible controller file system community.kubernetes.k8s: state: present template: '/testing/deployment.j2' -- name: Read definition template file from the Ansible controller file system +- name: Read definition template file from the Ansible controller file system that uses custom start/end strings community.kubernetes.k8s: state: present template: diff --git a/plugins/modules/k8s_rollback.py b/plugins/modules/k8s_rollback.py index 7eea9991..7ccd4153 100644 --- a/plugins/modules/k8s_rollback.py +++ b/plugins/modules/k8s_rollback.py @@ -17,7 +17,7 @@ author: description: - Use the OpenShift Python client to perform the Rollback. - Authenticate using either a config file, certificates, password or token. - - Similar to the kubectl rollout undo command. + - Similar to the C(kubectl rollout undo) command. options: label_selectors: description: List of label selectors to use to filter results.