v3_8.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ---
  2. - name: Add cloud rpm repository
  3. get_url:
  4. url: https://iso.yunion.cn/yumrepo-3.8/yunion.repo
  5. dest: /etc/yum.repos.d/yunion.repo
  6. validate_certs: no
  7. become: yes
  8. when:
  9. - is_centos_x86 is defined
  10. - name: make cache
  11. shell: |
  12. yum clean all
  13. yum -y --disablerepo='*' --enablerepo='yunion*' makecache
  14. when:
  15. - is_centos_x86 is defined
  16. - name: Install cloud common packages
  17. yum:
  18. state: latest
  19. enablerepo: "{{ (online_status != 'online') | ternary('yunion-*', omit) }}"
  20. disablerepo: "{{ (online_status != 'online') | ternary('*', omit) }}"
  21. name:
  22. - kernel-3.10.0-1160.6.1.el7.yn20201125
  23. - kernel-devel-3.10.0-1160.6.1.el7.yn20201125
  24. - kernel-headers-3.10.0-1160.6.1.el7.yn20201125
  25. - yunion-executor
  26. when:
  27. - is_centos_x86 is defined
  28. - name: init apt cache for debian
  29. get_url:
  30. url: https://iso.yunion.cn/uos/buster/{{ debian_based_arch }}/3.8/yunion.gpg-key.asc
  31. dest: /tmp/yunion.gpg-key.asc
  32. validate_certs: no
  33. become: yes
  34. when:
  35. - is_debian_based is defined
  36. - name: apply debian sig key
  37. shell: |
  38. echo "deb [trusted=yes] https://iso.yunion.cn/uos/buster/{{ debian_based_arch }}/3.8 ./" > /etc/apt/sources.list.d/yunion.list;
  39. apt-key add /tmp/yunion.gpg-key.asc;
  40. apt-get update -y;
  41. rm -f /tmp/yunion.gpg-key.asc
  42. args:
  43. executable: /bin/bash
  44. when:
  45. - is_debian_based is defined
  46. - name: install libselinux-python for arm64 centos
  47. yum:
  48. name: libselinux-python
  49. when:
  50. - is_centos_aarch64 is defined
  51. - name: Add cloud rpm repository for arm64 centos
  52. get_url:
  53. url: https://iso.yunion.cn/centos-7-aarch/yunion.repo
  54. dest: /etc/yum.repos.d/yunion.repo
  55. validate_certs: no
  56. become: yes
  57. when:
  58. - is_centos_aarch64 is defined
  59. - non_iso_mode is defined
  60. - name: Install cloud common packages for arm64
  61. yum:
  62. state: latest
  63. name:
  64. - kernel-4.14.0-115.8.2.el7a.yn20210924
  65. - yunion-executor
  66. when:
  67. - is_centos_aarch64 is defined
  68. - non_iso_mode is defined