main.yml 730 B

123456789101112131415161718192021
  1. - name: test var enable_eip_man
  2. environment:
  3. KUBECONFIG: "{{ ENV_KUBECONFIG }}"
  4. shell: |
  5. source <(/opt/yunion/bin/fetch-rcadmin.sh cluster rcadmin)
  6. if grep -q '^sdn_enable_eip_man:' /etc/yunion/host.conf; then
  7. sed -i -e 's#^sdn_enable_eip_man.*#sdn_enable_eip_man: true#' /etc/yunion/host.conf
  8. else
  9. echo 'sdn_enable_eip_man: true' >> /etc/yunion/host.conf
  10. fi
  11. {{ K3S_CMDLINE_PREFIX }} kubectl rollout restart ds -n onecloud default-host
  12. args:
  13. executable: /bin/bash
  14. become: yes
  15. ignore_errors: yes
  16. changed_when: false
  17. failed_when: false
  18. when:
  19. - enable_eip_man | default(false) | bool == true
  20. - product_version | default('fullstack') | lower in ['fullstack', 'edge', 'ai']