jenkins_docker_base
ansible_role-jenkins_docker_base
This role will install the minimal dependencies for customer containers used with the kubernetes plugin for jenkins slaves. Added support for sudo permissions since the expectation is that jenkins
user will be defaulted on the container.
Note - when building Docker image, be sure to set USER: jenkins
to set runtime user.
Requirements
None.
Role Variables
See /default/main.yml for variables.
Jenkins user
jenkins_user: jenkins
Jenkins user id
jenkins_uid: 10000
Home directory of jenkins user
jenkins_home: /home/jenkins
Shell of jenkins user
jenkins_user_shell: /usr/bin/bash
Default group of jenkins user
jenkins_group: jenkins
Jenkins group id
jenkins_gid: 10000
Jenkins user groups
jenkins_groups:
- { name: "{{ jenkins_group }}", gid: "{{ jenkins_gid }}" }
- { name: sudo, gid: 10001 }
Dependencies
Added the dependency for Andrew Rothstein's "sudoers" role to allow jenkins user sudo access.
Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: ansible_role-jenkins_docker_base }
License
MIT
About
Ansible role to install the minimum requirements for a jenkins kubernetes slave.
Install
ansible-galaxy install JRemitz/ansible_role-jenkins_docker_base
License
mit
Downloads
2025
Owner
Director of Operations, Engineering