!fix(gitlab_runner): Rename vars to match new lint rule
This commit is contained in:
parent
f10477e3ba
commit
574a5c9231
4 changed files with 42 additions and 42 deletions
|
@ -18,38 +18,38 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Install location settings
|
# Install location settings
|
||||||
gitlabrunner_install_location: "/srv/gitlab-runner"
|
gitlab_runner_install_location: "/srv/gitlab-runner"
|
||||||
gitlabrunner_config_location: "{{ gitlabrunner_install_location }}/config"
|
gitlab_runner_config_location: "{{ gitlab_runner_install_location }}/config"
|
||||||
|
|
||||||
# The runner image & tag/version to be used
|
# The runner image & tag/version to be used
|
||||||
gitlabrunner_image: "docker.io/gitlab/gitlab-runner"
|
gitlab_runner_image: "docker.io/gitlab/gitlab-runner"
|
||||||
# renovate: depName=docker.io/gitlab/gitlab-runner
|
# renovate: depName=docker.io/gitlab/gitlab-runner
|
||||||
gitlabrunner_image_version: "v16.4.0"
|
gitlab_runner_image_version: "v16.4.0"
|
||||||
gitlabrunner_image_variant: "alpine-{{ gitlabrunner_image_version }}"
|
gitlab_runner_image_variant: "alpine-{{ gitlab_runner_image_version }}"
|
||||||
|
|
||||||
# Extra paths that should be created (eg. to be mounted in the container)
|
# Extra paths that should be created (eg. to be mounted in the container)
|
||||||
gitlabrunner_extra_paths: []
|
gitlab_runner_extra_paths: []
|
||||||
|
|
||||||
# Enable or disable selinux handling
|
# Enable or disable selinux handling
|
||||||
gitlabrunner_selinux_enabled: true
|
gitlab_runner_selinux_enabled: true
|
||||||
|
|
||||||
# Should the docker socket be mounted to the gitlab runner (usually needed for the docker executor)
|
# Should the docker socket be mounted to the gitlab runner (usually needed for the docker executor)
|
||||||
gitlabrunner_mount_docker_socket: false
|
gitlab_runner_mount_docker_socket: false
|
||||||
|
|
||||||
# Extra volumes that should be added to the gitlab runner container.
|
# Extra volumes that should be added to the gitlab runner container.
|
||||||
gitlabrunner_extra_volumes: []
|
gitlab_runner_extra_volumes: []
|
||||||
|
|
||||||
# The maximum overall concurrent running jobs. This is the most upper limit of number of jobs using all defined runners, local and autoscale.
|
# The maximum overall concurrent running jobs. This is the most upper limit of number of jobs using all defined runners, local and autoscale.
|
||||||
gitlabrunner_concurrent: 1
|
gitlab_runner_concurrent: 1
|
||||||
|
|
||||||
# The interval in seconds, to check for available jobs. (0 means default value is used.
|
# The interval in seconds, to check for available jobs. (0 means default value is used.
|
||||||
# See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#how-check_interval-works)
|
# See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#how-check_interval-works)
|
||||||
gitlabrunner_check_interval: 0
|
gitlab_runner_check_interval: 0
|
||||||
|
|
||||||
# This is used to define all the runners, that may be served by this gitlab-runner
|
# This is used to define all the runners, that may be served by this gitlab-runner
|
||||||
# !! YOU WILL NEED TO ADJUST THIS! BELOW IS A FULL EXAMPLE!
|
# !! YOU WILL NEED TO ADJUST THIS! BELOW IS A FULL EXAMPLE!
|
||||||
gitlabrunner_runners:
|
gitlab_runner_runners:
|
||||||
# The URL of the instance that this runner should be associated with
|
# The URL of the instance that this runner should be associated with
|
||||||
- gitlab_url: https://gitlab.example.com
|
- gitlab_url: https://gitlab.example.com
|
||||||
|
|
||||||
# The token that you received when registering the runner (not the register token!!!)
|
# The token that you received when registering the runner (not the register token!!!)
|
||||||
|
|
|
@ -20,47 +20,47 @@
|
||||||
|
|
||||||
- name: Update default SELinux contexts
|
- name: Update default SELinux contexts
|
||||||
community.general.sefcontext:
|
community.general.sefcontext:
|
||||||
target: '{{ item }}(/.*)?'
|
target: "{{ item }}(/.*)?"
|
||||||
setype: "container_file_t"
|
setype: "container_file_t"
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ gitlabrunner_config_location }}"
|
- "{{ gitlab_runner_config_location }}"
|
||||||
- "{{ gitlabrunner_extra_paths }}"
|
- "{{ gitlab_runner_extra_paths }}"
|
||||||
when:
|
when:
|
||||||
- gitlabrunner_selinux_enabled
|
- gitlab_runner_selinux_enabled
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create install directory
|
- name: Create install directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0700'
|
mode: "0700"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ gitlabrunner_install_location }}"
|
- "{{ gitlab_runner_install_location }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create config directory
|
- name: Create config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: '0700'
|
mode: "0700"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
setype: "container_file_t"
|
setype: "container_file_t"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ gitlabrunner_config_location }}"
|
- "{{ gitlab_runner_config_location }}"
|
||||||
- "{{ gitlabrunner_extra_paths }}"
|
- "{{ gitlab_runner_extra_paths }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Deploy docker-compose.yml
|
- name: Deploy docker-compose.yml
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: docker-compose.yml
|
src: docker-compose.yml
|
||||||
dest: "{{ gitlabrunner_install_location }}/docker-compose.yml"
|
dest: "{{ gitlab_runner_install_location }}/docker-compose.yml"
|
||||||
mode: '0600'
|
mode: "0600"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
validate: docker-compose -f %s config -q
|
validate: docker-compose -f %s config -q
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
@ -69,16 +69,16 @@
|
||||||
- name: Deploy config.toml for gitlab-runner
|
- name: Deploy config.toml for gitlab-runner
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: config.toml
|
src: config.toml
|
||||||
dest: "{{ gitlabrunner_config_location }}/config.toml"
|
dest: "{{ gitlab_runner_config_location }}/config.toml"
|
||||||
mode: '0600'
|
mode: "0600"
|
||||||
owner: 'root'
|
owner: "root"
|
||||||
group: 'root'
|
group: "root"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Compose gitlab-runner
|
- name: Compose gitlab-runner
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
state: present
|
state: present
|
||||||
project_src: "{{ gitlabrunner_config_location }}"
|
project_src: "{{ gitlab_runner_config_location }}"
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
concurrent = {{ gitlabrunner_concurrent }}
|
concurrent = {{ gitlab_runner_concurrent }}
|
||||||
check_interval = {{ gitlabrunner_check_interval }}
|
check_interval = {{ gitlab_runner_check_interval }}
|
||||||
|
|
||||||
{% for gitlabrunner in gitlabrunner_runners %}
|
{% for gitlabrunner in gitlab_runner_runners %}
|
||||||
[[runners]]
|
[[runners]]
|
||||||
name = "{{ gitlabrunner.name }}"
|
name = "{{ gitlabrunner.name }}"
|
||||||
limit = {{ gitlabrunner.limit | default(1) }}
|
limit = {{ gitlabrunner.limit | default(1) }}
|
||||||
|
|
|
@ -19,15 +19,15 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
runner:
|
runner:
|
||||||
image: {{ gitlabrunner_image }}:{{ gitlabrunner_image_variant }}
|
image: {{ gitlab_runner_image }}:{{ gitlab_runner_image_variant }}
|
||||||
mem_limit: 128mb
|
mem_limit: 128mb
|
||||||
memswap_limit: 256mb
|
memswap_limit: 256mb
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ gitlabrunner_config_location }}:/etc/gitlab-runner"
|
- "{{ gitlab_runner_config_location }}:/etc/gitlab-runner"
|
||||||
{% if gitlabrunner_mount_docker_socket %}
|
{% if gitlab_runner_mount_docker_socket %}
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for item in gitlabrunner_extra_volumes %}
|
{% for item in gitlab_runner_extra_volumes %}
|
||||||
- "{{item}}"
|
- "{{item}}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
restart: always
|
restart: always
|
||||||
|
|
Loading…
Add table
Reference in a new issue