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" +