From fcc19da20a62049b7b2d8cf21833c97c6ae3c50f Mon Sep 17 00:00:00 2001 From: Bharat Babbar <119395045+BabbarPB08@users.noreply.github.com> Date: Thu, 18 Jan 2024 20:52:39 +0530 Subject: [PATCH] Update k8s.py (#218) docs.ansible.com is managed by Red Hat and I found that the example to create the OCP/OKD project was missing in this hence I have added the below snippet: - name: Create an OCP project community.okd.k8s: state: present resource_definition: apiVersion: project.openshift.io/v1 kind: Project metadata: name: testing Please add this to the man pages also. --- plugins/modules/k8s.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index ae3a9b4..aca973a 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -145,6 +145,15 @@ requirements: """ EXAMPLES = r""" +- name: Create an OCP project + community.okd.k8s: + state: present + resource_definition: + apiVersion: project.openshift.io/v1 + kind: Project + metadata: + name: testing + - name: Create a k8s namespace community.okd.k8s: name: testing