JRemitz / ansible_role-jenkins_docker_base

Ansible role for installing dependencies of the kubernetes plugin used with custom containers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible_role-jenkins_docker_base

Build Status

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 for installing dependencies of the kubernetes plugin used with custom containers.

License:MIT License