Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine 'Download' and 'Expand' solr tasks using unarchive #58

Closed
geerlingguy opened this issue Feb 15, 2017 · 1 comment
Closed

Combine 'Download' and 'Expand' solr tasks using unarchive #58

geerlingguy opened this issue Feb 15, 2017 · 1 comment

Comments

@geerlingguy
Copy link
Owner

Since 2.0 is pretty much everywhere, we can use unarchives ability to download and expand-into-place the Solr archive.

Currently, the download file sits on the system after the role is finished, but that's annoying... it's like 150MB! And it's causing downstream projects to also be larger than necessary. See, for example: https://github.com/geerlingguy/docker-image-solr/issues/5

Basically, with Ansible 2.x, we should be able to combine these two tasks:

- name: Download Solr.
  get_url:
    url: "{{ solr_mirror }}/lucene/solr/{{ solr_version }}/{{ solr_filename }}.tgz"
    dest: "{{ solr_workspace }}/{{ solr_filename }}.tgz"
    force: no

- name: Expand Solr.
  unarchive:
    src: "{{ solr_workspace }}/{{ solr_filename }}.tgz"
    dest: "{{ solr_workspace }}"
    creates: "{{ solr_workspace }}/{{ solr_filename }}/CHANGES.txt"
    copy: no

Also, related: #14

@geerlingguy
Copy link
Owner Author

...of course I forgot that the Solr download script is looking for the source repo :/

geerlingguy added a commit that referenced this issue Feb 15, 2017
Fixes #58: Combine download and expand role tasks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant