Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
k8s: Add example for download and apply manifest from URL (#359)
Browse files Browse the repository at this point in the history
Fixes: #352

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
  • Loading branch information
Akasurde committed Feb 3, 2021
1 parent 2640084 commit 92e3732
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/352-k8s.yml
Original file line number Diff line number Diff line change
@@ -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).
12 changes: 12 additions & 0 deletions plugins/modules/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,18 @@
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'''
Expand Down

0 comments on commit 92e3732

Please sign in to comment.