k8s: Add example for download and apply manifest from URL (#359)

Fixes: #352

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde
2021-02-03 21:16:44 +05:30
committed by GitHub
parent 2640084143
commit 92e373239c
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
minor_changes:
- k8s - add an example for downloading manifest file and applying (https://github.com/ansible-collections/community.kubernetes/issues/352).

View File

@@ -209,6 +209,18 @@ EXAMPLES = r'''
validate:
fail_on_error: no
strict: yes
# Download and apply manifest
- name: Download metrics-server manifest to the cluster.
ansible.builtin.get_url:
url: https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
dest: ~/metrics-server.yaml
mode: '0664'
- name: Apply metrics-server manifest to the cluster.
community.kubernetes.k8s:
state: present
src: ~/metrics-server.yaml
'''
RETURN = r'''