Skip to content

Commit

Permalink
use cloudalchemybot when accessing github api (cloudalchemy#120)
Browse files Browse the repository at this point in the history
This will cause to access github API as authenticated cloudalchemybot user (when there is GH_TOKEN variable set) or unauthenticated (when there is no GH_TOKEN var)

Resolves cloudalchemy#115
  • Loading branch information
paulfantom authored May 27, 2018
1 parent f6cf668 commit 9c342f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@
with_dict: "{{ prometheus_targets }}"

- block:
- name: get latest release
- name: Get latest release
uri:
url: "https://api.github.com/repos/prometheus/prometheus/releases/latest"
method: GET
return_content: true
status_code: 200
body_format: json
validate_certs: false
user: "{{ lookup('env', 'GH_USER') | default(omit) }}"
password: "{{ lookup('env', 'GH_TOKEN') | default(omit) }}"
no_log: true
register: _latest_release
until: _latest_release.status == 200
retries: 5
Expand Down

0 comments on commit 9c342f2

Please sign in to comment.