master.yml 962 B

1234567891011121314151617181920212223242526272829303132333435363738
  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: Install cloud common packages
  11. yum:
  12. state: latest
  13. enablerepo: "{{ (online_status != 'online') | ternary('yunion-*', omit) }}"
  14. disablerepo: "{{ (online_status != 'online') | ternary('*', omit) }}"
  15. name:
  16. - yunion-executor
  17. when:
  18. - is_centos_x86 is defined
  19. - name: init apt cache for debian
  20. get_url:
  21. url: https://iso.yunion.cn/uos/buster/{{ debian_based_arch }}/3.8/yunion.gpg-key.asc
  22. dest: /tmp/yunion.gpg-key.asc
  23. validate_certs: no
  24. become: yes
  25. when:
  26. - is_debian_based is defined
  27. - name: apply debian sig key
  28. shell: |
  29. apt-key add /tmp/yunion.gpg-key.asc;
  30. apt-get update -y;
  31. rm -f /tmp/yunion.gpg-key.asc
  32. args:
  33. executable: /bin/bash
  34. when:
  35. - is_debian_based is defined