Working on source packages
Signed-off-by: Matthew Stobbs <matthew@stobbs.ca>
This commit is contained in:
29
tasks/helpers/archive.yml
Normal file
29
tasks/helpers/archive.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Extract archive to given path
|
||||
block:
|
||||
- name: Ensure directory exists
|
||||
become: "{{ install_become }}"
|
||||
become_user: "{{ install_become_user }}"
|
||||
ansible.bulitin.file:
|
||||
state: directory
|
||||
path: "{{ extract_path }}"
|
||||
mode: "{{ install_prefix_mode }}"
|
||||
owner: "{{ install_prefix_owner }}"
|
||||
group: "{{ install_prefix_group }}"
|
||||
|
||||
- name: Download archive to cache
|
||||
ansible.builtin.get_url:
|
||||
dest: "{{ d_cache }}/{{ archive_name }}"
|
||||
url: "{{ archive_url }}"
|
||||
checksum: "{{ archive_checksum }}"
|
||||
decompress: false
|
||||
mode: '0644'
|
||||
|
||||
- name: Extract go archive
|
||||
ansible.builtin.unarchive:
|
||||
dest: "{{ extract_path }}"
|
||||
src: "{{ d_cache }}/{{ archive_name }}"
|
||||
remote_src: true
|
||||
include: "{{ archive_include | default(omit) }}"
|
||||
exclude: "{{ archive_exclude | default(omit) }}"
|
||||
Reference in New Issue
Block a user