Created
October 16, 2019 18:22
-
-
Save 0x4a5e1e4baab/005ebaab800340bc2361f731f33f5d37 to your computer and use it in GitHub Desktop.
download-gitlab-release-artifact.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - 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