This Ansible role automates the installation and initial configuration of Jenkins CI on servers running RHEL/CentOS or Debian/Ubuntu. It handles installation via package, ensures required tools like curl and Java 8+ are present, and is structured to integrate smoothly into repeatable provisioning workflows. Changes made to the Jenkins systemd override.conf file; the default set of changes set the configured URL prefix, Jenkins home directory, Jenkins port and adds the configured Jenkins and Java options for Jenkins' startup. You can add other option/value pairs if you need to set other options for the Jenkins systemd override.conf file. If you are running Jenkins behind a proxy server, configure these options appropriately. Otherwise Jenkins will be configured with a direct Internet connection.
Features
- Installs Jenkins on RHEL/CentOS and Debian/Ubuntu platforms
- Ensures prerequisites like curl and Java 8+ are installed
- Configurable variables: package state, hostname, Jenkins home directory, HTTP port, admin credentials
- Supports managing package version state (present vs. latest)
- Integrates with Molecule for testing and validation on multiple OSes
- Reusable and community-maintained, ideal for infrastructure as code use cases