ansible-role-for-splunk icon indicating copy to clipboard operation
ansible-role-for-splunk copied to clipboard

feat(install): remove downloaded package after unarchive

Open zyphermonkey opened this issue 3 years ago • 3 comments

package is no longer needed after unarchive and can safely be removed to keep the disk clean

zyphermonkey avatar Sep 30 '22 15:09 zyphermonkey

@zyphermonkey The reason we decided to not remove the package is because if you run it against multiple instances, it will need to download the package many times. It annoys me sometime too to have to clean up old downloaded versions etc.

Do you have any other ideas how to clean it up without having to download it multiple times? Maybe a conditional var for that task when something like cleanup: true is passed at run-time? Maybe a tag?

dtwersky avatar Oct 07 '22 17:10 dtwersky

@zyphermonkey The reason we decided to not remove the package is because if you run it against multiple instances, it will need to download the package many times. It annoys me sometime too to have to clean up old downloaded versions etc.

That makes sense. I forgot in my local version we don't use delegate_to: localhost anymore so the download and cleanup is always on a per host basis.

Maybe I'll working on getting another PR put in that allows for the user to chose local vs remote. Which would also close https://github.com/splunk/ansible-role-for-splunk/issues/48. If download location is set to remote then we'll cleanup everytime. If not leave the download on the localhost for other hosts to prevent constant re-downloads.

zyphermonkey avatar Oct 07 '22 20:10 zyphermonkey

New commit adds the discussed feature although it doesn't completely close #48. I have not used the configure_apps.yml download feature yet so I need some more time to review those tasks and determine the best way to implement local vs remote downloading.

Should be good to merge with just these changes now though. 😃

zyphermonkey avatar Oct 08 '22 11:10 zyphermonkey

Anything I need to do for merge?

zyphermonkey avatar Nov 03 '22 10:11 zyphermonkey