Skip to content

Instantly share code, notes, and snippets.

@0x4a5e1e4baab
Created October 16, 2019 18:22
Show Gist options
  • Select an option

  • Save 0x4a5e1e4baab/005ebaab800340bc2361f731f33f5d37 to your computer and use it in GitHub Desktop.

Select an option

Save 0x4a5e1e4baab/005ebaab800340bc2361f731f33f5d37 to your computer and use it in GitHub Desktop.
download-gitlab-release-artifact.yml
---
- hosts: 127.0.0.1
connection: local
gather_facts: true
vars:
gitlab_read_only_token: some-token
gitlab_project_id: 303203103210
collector_tag: 0.0.8-release
tasks:
- name: Download collector
get_url:
url: "https://gitlab.com/api/v4/projects/{{ gitlab_project_id }}/repository/archive.zip?sha={{collector_tag}}"
dest: /path/to/download/archive.zip
headers:
PRIVATE-TOKEN: "{{ gitlab_read_only_token }}"
- name: Unarchive release
unarchive:
src: /path/to/download/archive.zip
dest: /path/to/unzip/collector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment