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: jenkinsJenkins user id
jenkins_uid: 10000Home directory of jenkins user
jenkins_home: /home/jenkinsShell of jenkins user
jenkins_user_shell: /usr/bin/bashDefault group of jenkins user
jenkins_group: jenkinsJenkins group id
jenkins_gid: 10000Jenkins 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