diff options
author | Andrew Butcher <abutcher@afrolegs.com> | 2016-06-29 11:40:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 11:40:38 -0400 |
commit | a7c5f41157e61d9478c0f46671347bc84401f2c7 (patch) | |
tree | 08c2244c5e52351cce384ef01c571e33bcd809a8 /roles | |
parent | df9b208c3eb993d0d1f7c0e715fa4ef49261aa47 (diff) | |
parent | 1448af9bfa2eea834de1426268f68ecdae7b8126 (diff) | |
download | openshift-a7c5f41157e61d9478c0f46671347bc84401f2c7.tar.gz openshift-a7c5f41157e61d9478c0f46671347bc84401f2c7.tar.bz2 openshift-a7c5f41157e61d9478c0f46671347bc84401f2c7.tar.xz openshift-a7c5f41157e61d9478c0f46671347bc84401f2c7.zip |
Merge pull request #2098 from openshift/revert-2087-speedy_example_copy
Revert "Speed up copying OpenShift examples"
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_examples/tasks/main.yml | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml index e9966d735..fb10188f2 100644 --- a/roles/openshift_examples/tasks/main.yml +++ b/roles/openshift_examples/tasks/main.yml @@ -1,46 +1,9 @@ --- -###################################################################### -# Copying Examples -# -# We used to use the copy module to transfer the openshift examples to -# the remote. Then it started taking more than a minute to transfer -# the files. As noted in the module: -# -# "The 'copy' module recursively copy facility does not scale to -# lots (>hundreds) of files." -# -# The `synchronize` module is suggested as an alternative, we can't -# use it either due to changes introduced in Ansible 2.x. -- name: Create local temp dir for OpenShift examples copy - local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - become: False - register: copy_examples_mktemp - run_once: True - -- name: Create tar of OpenShift examples - local_action: command tar -C "{{ role_path }}/files/examples/{{ content_version }}/" -cvf "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" . - become: False - register: copy_examples_tar - -- name: Create the remote OpenShift examples directory - file: - dest: "{{ examples_base }}" - state: directory - mode: 0755 - -- name: Unarchive the OpenShift examples on the remote - unarchive: - src: "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" +- name: Copy openshift examples + copy: + src: "examples/{{ content_version }}/" dest: "{{ examples_base }}/" -- name: Cleanup the OpenShift Examples temp dir - become: False - local_action: file dest="{{ copy_examples_mktemp.stdout }}" state=absent - -# Done copying examples -###################################################################### -# Begin image streams - - name: Modify registry paths if registry_url is not registry.access.redhat.com shell: > find {{ examples_base }} -type f | xargs -n 1 sed -i 's|registry.access.redhat.com|{{ registry_host | quote }}|g' |