JRemitz.jenkins_docker_base

ansible_role-jenkins_docker_base

Build Status

This role sets up the basic requirements for customer containers that work with the kubernetes plugin for Jenkins slaves. It also supports sudo permissions because the jenkins user is typically used in the container.

Note: When creating the Docker image, make sure to set USER: jenkins to define the user that runs the container.

Requirements

None.

Role Variables

Check the file /default/main.yml for the variables used in this role.

  • Jenkins user:

    jenkins_user: jenkins
    
  • Jenkins user ID:

    jenkins_uid: 10000
    
  • Home directory for the Jenkins user:

    jenkins_home: /home/jenkins
    
  • Shell for the Jenkins user:

    jenkins_user_shell: /usr/bin/bash
    
  • Default group for the 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

This role requires Andrew Rothstein's "sudoers" role to give the Jenkins user access to sudo.

Example Playbook

Here’s a simple example of how to use this role with parameters:

- hosts: servers
  roles:
    - { role: ansible_role-jenkins_docker_base }

License

MIT

Informazioni sul progetto

Ansible role to install the minimum requirements for a jenkins kubernetes slave.

Installa
ansible-galaxy install JRemitz.jenkins_docker_base
Licenza
mit
Download
2k
Proprietario
Director of Operations, Engineering