Skip to content

Commit 6c9662f

Browse files
committed
Add Github CI runner proxy support
Conditionally define custom_env fact to leverage monolithprojects.github_actions_runner role support for setting proxy on deployed Github runners.
1 parent c08abed commit 6c9662f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

etc/kayobe/ansible/deployment/deploy-github-runner.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
- role: geerlingguy.pip
77
- role: geerlingguy.docker
88
tasks:
9+
- name: Set custom_env fact if any proxy variable is defined
10+
set_fact:
11+
custom_env: |
12+
http_proxy={{ http_proxy | default('') }}
13+
https_proxy={{ https_proxy | default('') }}
14+
no_proxy=localhost,127.0.0.1,127.0.0.2,{{ no_proxy | default('') | join(',') }}
15+
when: >
16+
http_proxy is defined or
17+
https_proxy is defined or
18+
no_proxy is defined
19+
920
- name: Deploy runners
1021
ansible.builtin.include_role:
1122
name: monolithprojects.github_actions_runner
@@ -30,3 +41,4 @@
3041
with_dict: "{{ github_runners }}"
3142
loop_control:
3243
loop_var: runner
44+

0 commit comments

Comments
 (0)