From 5d7305aaba85fd208defed03deda0690d43ca19a Mon Sep 17 00:00:00 2001 From: djpbessems Date: Sun, 24 Apr 2022 12:32:34 +0200 Subject: [PATCH] Add debugging;Install Fleet --- playbook.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/playbook.yml b/playbook.yml index 89065c2..c9b6485 100644 --- a/playbook.yml +++ b/playbook.yml @@ -146,8 +146,12 @@ # seconds: 300 ansible.builtin.shell: cmd: kubectl get pod -A + register: pod_state with_sequence: count=5 - delay: 10 + loop_control: + pause: 10 + - ansible.builtin.debug: + var: pod_state.stdout delegate_to: "{{ ansible_play_hosts[0] }}" run_once: true @@ -195,3 +199,27 @@ name: "{{ item.name }}" repo_url: "{{ item.url }}" loop: "{{ helm.repositories }}" + + - block: + + - name: Rancher Fleet -- Determine latest version + ansible.builtin.uri: + url: https://api.github.com/repos/rancher/fleet/releases/latest + return_content: yes + register: latest_release + - ansible.builtin.debug: + var: latest_release + + - name: Rancher Fleet -- Install Helm chart + kubernetes.core.helm: + name: "{{ item.name }}" + chart_ref: "{{ item.url }}" + namespace: fleet-system + create_namespace: yes + wait: yes + loop: + - name: fleet-crd + url: "https://github.com/rancher/fleet/releases/download/{{ latest_release.tag_name }}/fleet-crd-{{ latest_release.tag_name }}.tgz" + - name: fleet + url: "https://github.com/rancher/fleet/releases/download/{{ latest_release.tag_name }}/fleet-{{ latest_release.tag_name }}.tgz" +