| 123456789101112131415161718192021222324252627282930 |
- ---
- - name: Add cloud rpm repository {{ online_status }} {{ ansible_architecture }}
- template: src=yunion.repo.j2 dest=/etc/yum.repos.d/yunion.repo
- when:
- - is_centos_based is defined
- - name: ensure dest exists
- file: path=/opt/yunion/upgrade state=directory mode=0755
- - name: sync rpms to dest
- shell: |
- for i in {{ offline_nodes }}; do
- rsync -Pvar {{offline_data_path}}/{rpms,repodata,images} $i:/opt/yunion/upgrade &
- done
- wait
- args:
- executable: /bin/bash
- become: yes
- when:
- - is_centos_based is defined
- - offline_nodes is defined
- - offline_nodes |length > 0
- - name: make cache
- shell: |
- yum clean all
- yum -y --disablerepo='*' --enablerepo='yunion-repo-offline' makecache
- when:
- - is_centos_based is defined
- become: yes
|