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.

18 lines
595 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-master']
  6. - name: Compress directory cluster-dump
  7. archive:
  8. path: /tmp/cluster-dump
  9. dest: /tmp/cluster-dump.tgz
  10. when: inventory_hostname in groups['kube-master']
  11. - name: Fetch dump file
  12. fetch:
  13. src: /tmp/cluster-dump.tgz
  14. dest: "{{ lookup('env', 'CI_PROJECT_DIR') }}/cluster-dump/{{ inventory_hostname }}.tgz"
  15. flat: true
  16. when: inventory_hostname in groups['kube-master']