12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- ---
- - name: Make sure kubeconfig is there on utility
- delegate_to: utility.lab.example.com
- file:
- path: /home/lab/{{ item }}/auth/kubeconfig
- state: file
- loop: "{{ clusters }}"
- - name: Create a temp dir
- file:
- path: tmp
- state: directory
- - name: Copy over the kubeconfig
- delegate_to: utility.lab.example.com
- fetch:
- src: /home/lab/{{ item }}/auth/kubeconfig
- dest: tmp/kubeconfig-{{ item }}
- flat: yes
- loop: "{{ clusters }}"
- - name: We need some packages to be there
- become: yes
- yum:
- name:
- - java-17-openjdk-headless
- - java-17-openjdk-devel
- - python3-jmespath
- - python3.11-jmespath
- - python3-kubernetes
- - ansible-collection-ansible-posix
- - ansible-collection-community-general
- state: latest
- - name: Verify cluster connectivity
- kubernetes.core.k8s_cluster_info:
- kubeconfig: tmp/kubeconfig-{{ item }}
- validate_certs: no
- loop: "{{ clusters }}"
- ...
|