Migrated from github.com/shafiqalibhai/ansible-role-jenkins https://galaxy.ansible.com/list#/roles/440
  • Dockerfile 100%
Find a file
2026-04-27 22:57:58 +00:00
defaults Cleanup for more flexible and maintainable Jenkins init configuration. 2015-09-06 22:12:02 -05:00
handlers Refactor - better layout, code style update. 2014-11-10 14:56:45 -06:00
meta Update main.yml 2015-11-24 14:23:45 +00:00
tasks Update setup-RedHat.yml 2015-11-24 14:04:43 +00:00
tests Cleanup for more flexible and maintainable Jenkins init configuration. 2015-09-06 22:12:02 -05:00
vars Cleanup for more flexible and maintainable Jenkins init configuration. 2015-09-06 22:12:02 -05:00
.travis.yml Cleanup for more flexible and maintainable Jenkins init configuration. 2015-09-06 22:12:02 -05:00
Dockerfile Add Dockerfile: ansible runner with role pre-installed 2026-04-27 22:57:58 +00:00
README.md Update README with comprehensive project information 2026-04-27 20:32:54 +00:00

ansible-role-jenkins

Overview

Installs Jenkins CI on RHEL/CentOS and Debian/Ubuntu servers.

Detected project type: Ansible role.

This repository was migrated from upstream source github.com/shafiqalibhai/ansible-role-jenkins and is preserved here for archival, reference, or continued local development.

At a glance

  • Default branch: master
  • Visibility: public
  • Size: 66 KB
  • Created: 2026-04-27
  • Last updated: 2026-04-27
  • Stars / Forks / Open issues: 0 / 0 / 0

Repository structure

  • defaults/
  • handlers/
  • meta/
  • tasks/
  • tests/
  • vars/
  • .travis.yml (1,056 B)
  • README.md (3,059 B)

Getting started

Clone the repository:

git clone https://forgejo.deployview.com/ssa/ansible-role-jenkins.git
cd ansible-role-jenkins

Installation

ansible-galaxy install -r requirements.yml
ansible-playbook playbook.yml

Usage

Include this role/collection in a playbook and run with ansible-playbook. See defaults/main.yml (if present) for configurable variables.

Original README

The content below is preserved from the previous README. Headings have been demoted so they don't compete with the new top-level sections.

Ansible Role: Jenkins CI

Build Status

Installs Jenkins CI on RHEL/CentOS and Debian/Ubuntu servers.

Requirements

Requires curl to be installed on the server.

Role Variables

Available variables are listed below, along with default values (see vars/main.yml):

jenkins_hostname: localhost

The system hostname; usually localhost works fine. This will be used during setup to communicate with the running Jenkins instance via HTTP requests.

jenkins_jar_location: /opt/jenkins-cli.jar

The location at which the jenkins-cli.jar jarfile will be kept. This is used for communicating with Jenkins via the CLI.

jenkins_plugins:
  - git
  - sonar
  - ssh

Jenkins plugins to be installed automatically during provisioning. You can always install more plugins via the Jenkins UI at a later time, but this is helpful in getting things up and running more quickly.

jenkins_url_prefix: ""

Used for setting a URL prefix for your Jenkins installation. The option is added as --prefix={{ jenkins_url_prefix }} to the Jenkins initialization java invocation, so you can access the installation at a path like http://www.example.com/{{ jenkins_url_prefix }}. Make sure you start the prefix with a /(e.g./jenkins`).

jenkins_connection_delay: 5
jenkins_connection_retries: 60

Amount of time and number of times to wait when connecting to Jenkins after initial startup, to verify that Jenkins is running. Total time to wait = delay * retries, so by default this role will wait up to 300 seconds before timing out.

# For RedHat/CentOS (role default):
jenkins_repo_url: http://pkg.jenkins-ci.org/redhat/jenkins.repo
jenkins_repo_key_url: http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
# For Debian (role default):
jenkins_repo_url: deb http://pkg.jenkins-ci.org/debian binary/
jenkins_repo_key_url: http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key

This role will install the latest version of Jenkins by default (using the official repositories as listed above). You can override these variables (use the correct set for your platform) to install the current LTS version instead:

# For RedHat/CentOS LTS:
jenkins_repo_url: http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
jenkins_repo_key_url: http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
# For Debian/Ubuntu LTS:
jenkins_repo_url: deb http://pkg.jenkins-ci.org/debian-stable binary/
jenkins_repo_key_url: http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key

Dependencies

  • geerlingguy.java

Example Playbook

- hosts: ci-server
  vars:
    jenkins_hostname: jenkins.example.com
  roles:
    - geerlingguy.jenkins

License

MIT (Expat) / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

Contributing

Contributions are welcome. The typical workflow is:

  1. Open an issue describing the change you'd like to make.
  2. Fork the repository (or create a feature branch if you have write access).
  3. Commit your changes with clear, descriptive messages.
  4. Open a pull request against the master branch.

Please follow the existing code style and include tests or reproduction steps where relevant.

License

No LICENSE file is currently present in this repository. Treat the contents as all rights reserved by the author until an explicit license is added. If you intend to share or accept contributions, consider adding an OSI-approved license such as MIT, Apache-2.0, or GPL-3.0.

Repository

  • Browse: https://forgejo.deployview.com/ssa/ansible-role-jenkins
  • Clone (HTTPS): https://forgejo.deployview.com/ssa/ansible-role-jenkins.git
  • Clone (SSH): ssh://git@forgejo.deployview.com:30143/ssa/ansible-role-jenkins.git
  • Upstream / origin: github.com/shafiqalibhai/ansible-role-jenkins

This README was generated automatically based on repository metadata, contents, and any prior README content. Edit any section above to add project-specific detail.