From 8d499bbc83b6029f7e067f9f09abe11229202bdb Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 27 Apr 2021 19:00:03 +0530 Subject: [PATCH] Update Kubernetes collection name in docs (#74440) --- .../rst/dev_guide/developing_collections_shared.rst | 10 +++++----- .../rst/dev_guide/developing_modules_documenting.rst | 4 ++-- docs/docsite/rst/dev_guide/style_guide/index.rst | 2 +- .../scenario_guides/kubernetes_scenarios/k8s_intro.rst | 6 +++--- .../kubernetes_scenarios/k8s_inventory.rst | 8 ++++---- .../kubernetes_scenarios/scenario_k8s_object.rst | 2 +- .../task_outputs/Add_a_pod_using_k8s.yaml | 2 +- docs/docsite/rst/user_guide/playbooks_filters.rst | 6 +++--- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/docsite/rst/dev_guide/developing_collections_shared.rst b/docs/docsite/rst/dev_guide/developing_collections_shared.rst index 331b27203ae..c509c1ef828 100644 --- a/docs/docsite/rst/dev_guide/developing_collections_shared.rst +++ b/docs/docsite/rst/dev_guide/developing_collections_shared.rst @@ -24,12 +24,12 @@ To include documentation fragments in your collection: .. code-block:: yaml extends_documentation_fragment: - - community.kubernetes.k8s_name_options - - community.kubernetes.k8s_auth_options - - community.kubernetes.k8s_resource_options - - community.kubernetes.k8s_scale_options + - kubernetes.core.k8s_name_options + - kubernetes.core.k8s_auth_options + - kubernetes.core.k8s_resource_options + - kubernetes.core.k8s_scale_options -:ref:`module_docs_fragments` covers the basics for documentation fragments. The `kubernetes `_ collection includes a complete example. +:ref:`module_docs_fragments` covers the basics for documentation fragments. The `kubernetes.core `_ collection includes a complete example. If you use FQCN, you can use documentation fragments from one collection in another collection. diff --git a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst index 759d85d2209..00bb863dfa4 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst @@ -255,7 +255,7 @@ content in a uniform way: .. note:: - To refer to a group of modules in a collection, use ``R()``. When a collection is not the right granularity, use ``C(..)``: - - ``Refer to the R(community.kubernetes collection, plugins_in_community.kubernetes) for information on managing kubernetes clusters.`` + - ``Refer to the R(kubernetes.core collection, plugins_in_kubernetes.core) for information on managing kubernetes clusters.`` - ``The C(win_*) modules (spread across several collections) allow you to manage various aspects of windows hosts.`` @@ -268,7 +268,7 @@ content in a uniform way: Documentation fragments ----------------------- -If you are writing multiple related modules, they may share common documentation, such as authentication details, file mode settings, ``notes:`` or ``seealso:`` entries. Rather than duplicate that information in each module's ``DOCUMENTATION`` block, you can save it once as a doc_fragment plugin and use it in each module's documentation. In Ansible, shared documentation fragments are contained in a ``ModuleDocFragment`` class in `lib/ansible/plugins/doc_fragments/ `_ or the equivalent directory in a collection. To include a documentation fragment, add ``extends_documentation_fragment: FRAGMENT_NAME`` in your module documentation. Use the fully qualified collection name for the FRAGMENT_NAME (for example, ``community.kubernetes.k8s_auth_options``). +If you are writing multiple related modules, they may share common documentation, such as authentication details, file mode settings, ``notes:`` or ``seealso:`` entries. Rather than duplicate that information in each module's ``DOCUMENTATION`` block, you can save it once as a doc_fragment plugin and use it in each module's documentation. In Ansible, shared documentation fragments are contained in a ``ModuleDocFragment`` class in `lib/ansible/plugins/doc_fragments/ `_ or the equivalent directory in a collection. To include a documentation fragment, add ``extends_documentation_fragment: FRAGMENT_NAME`` in your module documentation. Use the fully qualified collection name for the FRAGMENT_NAME (for example, ``kubernetes.core.k8s_auth_options``). Modules should only use items from a doc fragment if the module will implement all of the interface documented there in a manner that behaves the same as the existing modules which import that fragment. The goal is that items imported from the doc fragment will behave identically when used in another module that imports the doc fragment. diff --git a/docs/docsite/rst/dev_guide/style_guide/index.rst b/docs/docsite/rst/dev_guide/style_guide/index.rst index 1cbe5b79906..3cf50afe7a2 100644 --- a/docs/docsite/rst/dev_guide/style_guide/index.rst +++ b/docs/docsite/rst/dev_guide/style_guide/index.rst @@ -227,7 +227,7 @@ Modules require different suffixes from other plugins: .. code-block:: rst :ref:`arista.eos.eos_config ` - :ref:`community.kubernetes.kubectl connection plugin ` + :ref:`kubernetes.core.kubectl connection plugin ` .. note:: diff --git a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_intro.rst b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_intro.rst index 59636720bf9..7e156465c38 100644 --- a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_intro.rst +++ b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_intro.rst @@ -24,13 +24,13 @@ To use the modules, you'll need the following: Installation ============ -The Kubernetes modules are part of the `Ansible Kubernetes collection `_. +The Kubernetes modules are part of the `Ansible Kubernetes collection `_. To install the collection, run the following: .. code-block:: bash - $ ansible-galaxy collection install community.kubernetes + $ ansible-galaxy collection install kubernetes.core Authenticating with the API @@ -45,6 +45,6 @@ To disable SSL certificate verification, set ``verify_ssl`` to false. Reporting an issue ================== -If you find a bug or have a suggestion regarding modules, please file issues at `Ansible Kubernetes collection `_. +If you find a bug or have a suggestion regarding modules, please file issues at `Ansible Kubernetes collection `_. If you find a bug regarding OpenShift client, please file issues at `OpenShift REST Client issues `_. If you find a bug regarding Kubectl binary, please file issues at `Kubectl issue tracker `_ diff --git a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_inventory.rst b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_inventory.rst index 82fcac03407..bcca09eb15d 100644 --- a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_inventory.rst +++ b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/k8s_inventory.rst @@ -30,17 +30,17 @@ To use this Kubernetes dynamic inventory plugin, you need to enable it first by .. code-block:: ini [inventory] - enable_plugins = community.kubernetes.k8s + enable_plugins = kubernetes.core.k8s Then, create a file that ends in ``.k8s.yml`` or ``.k8s.yaml`` in your working directory. -The ``community.kubernetes.k8s`` inventory plugin takes in the same authentication information as any other Kubernetes modules. +The ``kubernetes.core.k8s`` inventory plugin takes in the same authentication information as any other Kubernetes modules. Here's an example of a valid inventory file: .. code-block:: yaml - plugin: community.kubernetes.k8s + plugin: kubernetes.core.k8s Executing ``ansible-inventory --list -i .k8s.yml`` will create a list of Pods that are ready to be configured using Ansible. @@ -48,7 +48,7 @@ You can also provide the namespace to gather information about specific pods fro .. code-block:: yaml - plugin: community.kubernetes.k8s + plugin: kubernetes.core.k8s connections: - namespaces: - test diff --git a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/scenario_k8s_object.rst b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/scenario_k8s_object.rst index 3a0d20c0df3..8fd46453e4a 100644 --- a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/scenario_k8s_object.rst +++ b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/scenario_k8s_object.rst @@ -52,7 +52,7 @@ Since Ansible utilizes the Kubernetes API to perform actions, in this use case w To begin, there are a few bits of information we will need. Here you are using Kubeconfig which is pre-configured in your machine. The Kubeconfig is generally located at ``~/.kube/config``. It is highly recommended to store sensitive information such as password, user certificates in a more secure fashion using :ref:`ansible-vault` or using `Ansible Tower credentials `_. -Now you need to supply the information about the Pod which will be created. Using ``definition`` parameter of the ``community.kubernetes.k8s`` module, you specify `PodTemplate `_. This PodTemplate is identical to what you provide to the ``kubectl`` command. +Now you need to supply the information about the Pod which will be created. Using ``definition`` parameter of the ``kubernetes.core.k8s`` module, you specify `PodTemplate `_. This PodTemplate is identical to what you provide to the ``kubectl`` command. What to expect -------------- diff --git a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/task_outputs/Add_a_pod_using_k8s.yaml b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/task_outputs/Add_a_pod_using_k8s.yaml index 7cfd43c815b..6b5633f61b1 100644 --- a/docs/docsite/rst/scenario_guides/kubernetes_scenarios/task_outputs/Add_a_pod_using_k8s.yaml +++ b/docs/docsite/rst/scenario_guides/kubernetes_scenarios/task_outputs/Add_a_pod_using_k8s.yaml @@ -1,7 +1,7 @@ --- - hosts: localhost collections: - - community.kubernetes + - kubernetes.core tasks: - name: Create a pod k8s: diff --git a/docs/docsite/rst/user_guide/playbooks_filters.rst b/docs/docsite/rst/user_guide/playbooks_filters.rst index 512c39cded5..a50643c8f45 100644 --- a/docs/docsite/rst/user_guide/playbooks_filters.rst +++ b/docs/docsite/rst/user_guide/playbooks_filters.rst @@ -1732,12 +1732,12 @@ Getting Kubernetes resource names .. note:: - These filters have migrated to the `community.kubernetes `_ collection. Follow the installation instructions to install that collection. + These filters have migrated to the `kuberernetes.core `_ collection. Follow the installation instructions to install that collection. Use the "k8s_config_resource_name" filter to obtain the name of a Kubernetes ConfigMap or Secret, including its hash:: - {{ configmap_resource_definition | community.kubernetes.k8s_config_resource_name }} + {{ configmap_resource_definition | kuberernetes.core.k8s_config_resource_name }} This can then be used to reference hashes in Pod specifications:: @@ -1754,7 +1754,7 @@ This can then be used to reference hashes in Pod specifications:: containers: - envFrom: - secretRef: - name: {{ my_secret | community.kubernetes.k8s_config_resource_name }} + name: {{ my_secret | kuberernetes.core.k8s_config_resource_name }} .. versionadded:: 2.8