mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 21:42:38 +00:00
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:
2
changelogs/fragments/352-k8s.yml
Normal file
2
changelogs/fragments/352-k8s.yml
Normal 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).
|
||||||
@@ -209,6 +209,18 @@ EXAMPLES = r'''
|
|||||||
validate:
|
validate:
|
||||||
fail_on_error: no
|
fail_on_error: no
|
||||||
strict: yes
|
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'''
|
RETURN = r'''
|
||||||
|
|||||||
Reference in New Issue
Block a user