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.
None.
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 }
Added the dependency for Andrew Rothstein's "sudoers" role to allow jenkins user sudo access.
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 }
MIT