v3_10-v3_11.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ---
  2. - name: Setup repo mirrors
  3. include_role:
  4. name: utils/mirror
  5. - name: sync files
  6. synchronize:
  7. src: "{{ item }}"
  8. dest: "{{ item }}"
  9. delete: yes
  10. recursive: yes
  11. delegate_to: "{{ primary_node_ip }}"
  12. with_items:
  13. - /etc/yum.repos.d/yunion.repo
  14. - "{{ offline_data_path }}/repodata/"
  15. - "{{ offline_data_path }}/rpms/"
  16. when:
  17. - primary_node_ip is defined
  18. - primary_node_ip != ansible_default_ipv4.address
  19. - name: "Add cloud rpm repository {{ yunion_yum_repo }}"
  20. copy:
  21. content: |
  22. [yunion-repo-offline]
  23. name=Packages for Yunion Multi-Cloud Platform -
  24. baseurl=https://iso.yunion.cn/$contentdir/$releasever/3.11/$basearch
  25. sslverify=0
  26. failovermethod=priority
  27. enabled=1
  28. gpgcheck=0
  29. dest: /etc/yum.repos.d/yunion.repo
  30. become: yes
  31. retries: 3
  32. delay: 30
  33. when:
  34. - is_centos | default(false) | bool == true
  35. - offline_data_path is not defined or offline_data_path | length == 0
  36. - name: "update repo"
  37. shell: |
  38. yum clean all
  39. yum --disablerepo='*' --enablerepo='yunion*' makecache fast
  40. when:
  41. - is_centos_based is defined
  42. - name: Upgrade common packages
  43. yum:
  44. name:
  45. - yunion-ocadm
  46. - yunion-climc
  47. - yunion-climc-ee
  48. - yunion-executor
  49. - yunion-qemu-4.2.0
  50. - openvswitch
  51. disablerepo: "{{ (online_status != 'online') | ternary('*', omit) }}"
  52. enablerepo: "{{ (online_status != 'online') | ternary('yunion-*', omit) }}"
  53. state: latest
  54. become: yes
  55. when:
  56. - is_centos_based is defined