Advertisement
r9odt

Untitled

Jun 22nd, 2025 (edited)
431
0
20 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #jinja2: lstrip_blocks: True
  2. {{ ansible_managed | comment('plain') }}
  3.  
  4. concurrent = {{ gitlab_runner_config_concurrent }}
  5. check_interval = 0
  6. listen_address = "0.0.0.0:9252"
  7.  
  8. [session_server]
  9.   session_timeout = {{ gitlab_runner_config_session_timeout }}
  10.  
  11. {# {% set _runners_state = ansible_facts['ansible_local']['gitlab-runner-state'] | default({}) %} #}
  12. {% if gitlab_runner_dind_container | bool %}
  13. {% set _runner_volumes = (gitlab_runner_runner.volumes | default(gitlab_runner_config_volumes)) + [gitlab_runner_dind_run_dir + ":/var/run", gitlab_runner_dind_cert_dir + ":/certs/client"] %}
  14. {% else %}
  15. {% set _runner_volumes = gitlab_runner_runner.volumes | default(gitlab_runner_config_volumes) + ["/certs/client", gitlab_runner_config_dir + '/' + gitlab_runner_runner.name + '/dind-service:/var/lib/docker'] %}
  16. {% endif %}
  17. [[runners]]
  18.   name = "{{ gitlab_runner_runner.name }}"
  19.   url = "{{ gitlab_runner_config_url }}"
  20.   {# token = "{{ _runners_state[gitlab_runner_runner.name]['token'] }}" #}
  21.   token = "{{ gitlab_runner_tokens[gitlab_runner_runner.name] }}"
  22.   executor = "docker"
  23.   [runners.custom_build_dir]
  24.   [runners.docker]
  25.     tls_verify = false
  26.     image = "{{ gitlab_runner_runner.image | default(gitlab_runner_config_docker_image) }}"
  27.     memory = "{{ gitlab_runner_runner.memory | default(gitlab_runner_config_memory) }}"
  28.     {% if gitlab_runner_runner.memory_swap is defined %}
  29.     memory_swap = "{{ gitlab_runner_runner.memory_swap }}"
  30.     {% endif %}
  31.     {% if gitlab_runner_runner.cpus is defined %}
  32.     cpus = "{{ gitlab_runner_runner.cpus }}"
  33.     {% endif %}
  34.     privileged = {{ gitlab_runner_runner.privileged | default(gitlab_runner_config_privileged) }}
  35.     disable_entrypoint_overwrite = false
  36.     oom_kill_disable = false
  37.     disable_cache = false
  38.     volumes = {{ _runner_volumes | to_json }}
  39.     shm_size = 0
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement