blob: 285a0a88324471c0397090c323a6f0c8a4232178 [file] [log] [blame]
---
- name: Update cache with key and value
cache:
key: "{{ item.key }}"
value: "{{ item.value }}"
with_items:
- { key: 'copy_archive', value: '{{ copy_archive }}' }
- name: Install the local mirror with proxy
shell: "{{ item }}"
environment:
no_proxy: "{{ no_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
with_items:
- "/opt/apigee/apigee-service/bin/apigee-service apigee-mirror uninstall"
- "/opt/apigee/apigee-service/bin/apigee-service apigee-mirror install"
- name: Sync the local mirror with only new rpms with proxy
shell: "/opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms apigeereleasever={{ apigeereleasever | default(opdk_version) }}"
when: all_rpms is not defined and not all_rpms | bool == True
environment:
no_proxy: "{{ no_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
- name: Sync the local mirror with all rpms with proxy
shell: "/opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync apigeereleasever={{ apigeereleasever | default(opdk_version) }}"
when: all_rpms is defined and all_rpms | bool == True
environment:
no_proxy: "{{ no_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
- name: Update with any extra packages that should be transported manually
become: yes
shell: "yum reinstall --downloadonly --downloaddir={{ apigee_home }}/data/apigee-mirror/repos/thirdparty/7 {{ archive_extra_packages | join(' ') }}"
when: archive_extra_packages is defined
- name: Create archive with proxy
shell: "/opt/apigee/apigee-service/bin/apigee-service apigee-mirror package"
environment:
no_proxy: "{{ no_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"