Skip to content

Commit

Permalink
Consider that the zuul executor may be an IP
Browse files Browse the repository at this point in the history
Exposed a variable to pass the API endpoint without computing it too.
  • Loading branch information
pablintino authored and openshift-merge-bot[bot] committed Dec 19, 2024
1 parent 19910b3 commit a3d4e43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ci/playbooks/multinode-autohold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@
block:
- name: Fetch existing autoholds from zuul
vars:
_zuul_host: >-
{{
zuul.executor.hostname
if (zuul.executor.hostname is ansible.utils.ip) else
(zuul.executor.hostname | split('.'))[1:] | join('.')
}}
_zuul_api_url: >-
{{
[
('https://'+ (zuul.executor.hostname | split('.'))[1:] | join('.')),
('https://'+ _zuul_host,
'zuul',
'api',
'tenant',
Expand All @@ -32,7 +38,7 @@
] | join('/')
}}
ansible.builtin.uri:
url: "{{ _zuul_api_url }}"
url: "{{ zuul_autohold_endpoint | default(_zuul_api_url) }}"
method: GET
headers:
Content-Type: "application/json"
Expand Down

0 comments on commit a3d4e43

Please sign in to comment.