debian_10.yml 780 B

1234567891011121314151617181920212223242526
  1. - name: get version tag
  2. environment:
  3. KUBECONFIG: "{{ENV_KUBECONFIG}}"
  4. shell: |
  5. {{ K3S_CMDLINE_PREFIX }} /usr/bin/kubectl get OnecloudCluster -n onecloud -o jsonpath='{.items[0].spec.version}'
  6. args:
  7. executable: /bin/bash
  8. delegate_to: "{{ k8s_controlplane_host }}"
  9. register: k8s_version_tag
  10. ignore_errors: true
  11. failed_when: false
  12. when: k8s_controlplane_host is defined
  13. - name: set onecloud_version if not provided
  14. set_fact:
  15. onecloud_version: "{{ k8s_version_tag.stdout }}"
  16. when:
  17. - onecloud_version is not defined
  18. - k8s_version_tag is defined
  19. - k8s_version_tag.rc == 0
  20. - name: Import task utils/config_iptables.yml
  21. include_tasks: utils/config_iptables.yml
  22. - name: Include Debian Family Common Tasks
  23. include_tasks: debian_family.yml