- name: get version tag environment: KUBECONFIG: "{{ENV_KUBECONFIG}}" shell: | {{ K3S_CMDLINE_PREFIX }} /usr/bin/kubectl get OnecloudCluster -n onecloud -o jsonpath='{.items[0].spec.version}' args: executable: /bin/bash delegate_to: "{{ k8s_controlplane_host }}" register: k8s_version_tag ignore_errors: true failed_when: false when: k8s_controlplane_host is defined - name: set onecloud_version if not provided set_fact: onecloud_version: "{{ k8s_version_tag.stdout }}" when: - onecloud_version is not defined - k8s_version_tag is defined - k8s_version_tag.rc == 0 - name: Import task utils/config_iptables.yml include_tasks: utils/config_iptables.yml - name: Include Debian Family Common Tasks include_tasks: debian_family.yml