From 6c9662fb66e8af80507b99064e5a7d3ad4dab402 Mon Sep 17 00:00:00 2001 From: Jakub Darmach Date: Fri, 21 Nov 2025 15:11:09 +0100 Subject: [PATCH 1/3] 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. --- .../ansible/deployment/deploy-github-runner.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/etc/kayobe/ansible/deployment/deploy-github-runner.yml b/etc/kayobe/ansible/deployment/deploy-github-runner.yml index 8f69d83455..ec19b0ad05 100644 --- a/etc/kayobe/ansible/deployment/deploy-github-runner.yml +++ b/etc/kayobe/ansible/deployment/deploy-github-runner.yml @@ -6,6 +6,17 @@ - role: geerlingguy.pip - role: geerlingguy.docker tasks: + - name: Set custom_env fact if any proxy variable is defined + set_fact: + custom_env: | + http_proxy={{ http_proxy | default('') }} + https_proxy={{ https_proxy | default('') }} + no_proxy=localhost,127.0.0.1,127.0.0.2,{{ no_proxy | default('') | join(',') }} + when: > + http_proxy is defined or + https_proxy is defined or + no_proxy is defined + - name: Deploy runners ansible.builtin.include_role: name: monolithprojects.github_actions_runner @@ -30,3 +41,4 @@ with_dict: "{{ github_runners }}" loop_control: loop_var: runner + From 8015b5f89440f43a7da8f52b59625677c078944c Mon Sep 17 00:00:00 2001 From: Jakub Darmach Date: Mon, 24 Nov 2025 15:22:56 +0100 Subject: [PATCH 2/3] Improve assembling no_proxy string --- etc/kayobe/ansible/deployment/deploy-github-runner.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/kayobe/ansible/deployment/deploy-github-runner.yml b/etc/kayobe/ansible/deployment/deploy-github-runner.yml index ec19b0ad05..9a49065654 100644 --- a/etc/kayobe/ansible/deployment/deploy-github-runner.yml +++ b/etc/kayobe/ansible/deployment/deploy-github-runner.yml @@ -11,7 +11,7 @@ custom_env: | http_proxy={{ http_proxy | default('') }} https_proxy={{ https_proxy | default('') }} - no_proxy=localhost,127.0.0.1,127.0.0.2,{{ no_proxy | default('') | join(',') }} + no_proxy={{ (['localhost', '127.0.0.1', '127.0.0.2'] + (no_proxy | default([]))) | join(',') }} when: > http_proxy is defined or https_proxy is defined or @@ -41,4 +41,3 @@ with_dict: "{{ github_runners }}" loop_control: loop_var: runner - From df992e49ca4e44eae82ead65c0e8bb545cbee12c Mon Sep 17 00:00:00 2001 From: Jakub Darmach Date: Wed, 26 Nov 2025 12:02:31 +0100 Subject: [PATCH 3/3] Ensure unique no_proxy addresses --- etc/kayobe/ansible/deployment/deploy-github-runner.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/kayobe/ansible/deployment/deploy-github-runner.yml b/etc/kayobe/ansible/deployment/deploy-github-runner.yml index 9a49065654..42b966c312 100644 --- a/etc/kayobe/ansible/deployment/deploy-github-runner.yml +++ b/etc/kayobe/ansible/deployment/deploy-github-runner.yml @@ -7,11 +7,11 @@ - role: geerlingguy.docker tasks: - name: Set custom_env fact if any proxy variable is defined - set_fact: + ansible.builtin.set_fact: custom_env: | http_proxy={{ http_proxy | default('') }} https_proxy={{ https_proxy | default('') }} - no_proxy={{ (['localhost', '127.0.0.1', '127.0.0.2'] + (no_proxy | default([]))) | join(',') }} + no_proxy={{ (['localhost', '127.0.0.1', '127.0.0.2'] + (no_proxy | default([]))) | unique | join(',') }} when: > http_proxy is defined or https_proxy is defined or