v3_7-v3_8.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ---
  2. - name: Setup repo mirrors
  3. include_role:
  4. name: utils/mirror
  5. - name: "Add cloud rpm repository {{ yunion_yum_repo }}"
  6. get_url:
  7. url: "{{ yunion_yum_repo }}"
  8. dest: /etc/yum.repos.d/yunion.repo
  9. force: yes
  10. validate_certs: no
  11. become: yes
  12. when:
  13. - is_centos_x86 is defined
  14. - name: "update repo"
  15. shell: |
  16. yum clean all
  17. yum --disablerepo='*' --enablerepo='yunion*' makecache fast
  18. when:
  19. - is_centos_based is defined
  20. - name: "uninstall old rpms"
  21. shell: |
  22. rpms=$(rpm -qa |grep yunion|grep -v fetcherfs |grep 3.6| xargs)
  23. if [ -n "$rpms" ]; then
  24. yum remove -y $rpms
  25. fi
  26. when:
  27. - is_centos_based is defined
  28. args:
  29. executable: /bin/bash
  30. - name: Install ceph-common packages
  31. yum:
  32. name:
  33. - ceph-common
  34. state: latest
  35. when:
  36. - is_centos_based is defined
  37. - name: Upgrade common packages
  38. yum:
  39. name:
  40. - yunion-ocadm
  41. - yunion-climc
  42. - yunion-executor
  43. disablerepo: "{{ (online_status != 'online') | ternary('*', omit) }}"
  44. enablerepo: "{{ (online_status != 'online') | ternary('yunion-*', omit) }}"
  45. state: latest
  46. when:
  47. - is_centos_based is defined