You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
631 B

  1. ---
  2. - name: Generate dump folder
  3. command: "{{ bin_dir }}/kubectl cluster-info dump --all-namespaces --output-directory /tmp/cluster-dump"
  4. no_log: true
  5. when: inventory_hostname in groups['kube_control_plane']
  6. - name: Compress directory cluster-dump
  7. archive:
  8. path: /tmp/cluster-dump
  9. dest: /tmp/cluster-dump.tgz
  10. mode: 0644
  11. when: inventory_hostname in groups['kube_control_plane']
  12. - name: Fetch dump file
  13. fetch:
  14. src: /tmp/cluster-dump.tgz
  15. dest: "{{ lookup('env', 'CI_PROJECT_DIR') }}/cluster-dump/{{ inventory_hostname }}.tgz"
  16. flat: true
  17. when: inventory_hostname in groups['kube_control_plane']