| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- ---
- - name: Setup repo mirrors
- include_role:
- name: utils/mirror
- - name: sync files
- synchronize:
- src: "{{ item }}"
- dest: "{{ item }}"
- delete: yes
- recursive: yes
- delegate_to: "{{ primary_node_ip }}"
- with_items:
- - /etc/yum.repos.d/yunion.repo
- - "{{ offline_data_path }}/repodata/"
- - "{{ offline_data_path }}/rpms/"
- when:
- - primary_node_ip is defined
- - primary_node_ip != ansible_default_ipv4.address
- - name: "Add cloud rpm repository {{ yunion_yum_repo }}"
- copy:
- content: |
- [yunion-repo-offline]
- name=Packages for Yunion Multi-Cloud Platform -
- baseurl=https://iso.yunion.cn/$contentdir/$releasever/3.11/$basearch
- sslverify=0
- failovermethod=priority
- enabled=1
- gpgcheck=0
- dest: /etc/yum.repos.d/yunion.repo
- become: yes
- retries: 3
- delay: 30
- when:
- - is_centos | default(false) | bool == true
- - offline_data_path is not defined or offline_data_path | length == 0
- - name: "update repo"
- shell: |
- yum clean all
- yum --disablerepo='*' --enablerepo='yunion*' makecache fast
- when:
- - is_centos_based is defined
- - name: Upgrade common packages
- yum:
- name:
- - yunion-ocadm
- - yunion-climc
- - yunion-climc-ee
- - yunion-executor
- - yunion-qemu-4.2.0
- - openvswitch
- disablerepo: "{{ (online_status != 'online') | ternary('*', omit) }}"
- enablerepo: "{{ (online_status != 'online') | ternary('yunion-*', omit) }}"
- state: latest
- become: yes
- when:
- - is_centos_based is defined
|