An (opinionated) Ansible role that installs Jenkins (LTS) on Debian-like systems.
It is recommended to run it on localhost and have a webserver (nginx) run in front of it, which configuration is not part of this role.
$ ./test.sh -i 192.168.1.159 -u vbox
- delete admin user if jenkins_admin_username != admin (https://stackoverflow.com/a/41255658/567193)
none
jenkins_http_listen_address: 127.0.0.1
jenkins_url: http://{{ jenkins_http_listen_address }}:8080
jenkins_memory_max: "{{ (ansible_memtotal_mb * 0.5) | round | int }}m"
jenkins_admin_username: admin
jenkins_admin_password: admin
jenkins_num_executors: 0
jenkins_plugins: []
jenkins_agent_port:
jenkins_java_args:
- -server
- -Djava.awt.headless=true
- -Xms{{ jenkins_memory_max }}
- -Xmx{{ jenkins_memory_max }}
- -Djenkins.install.runSetupWizard=false
# https://www.cloudbees.com/blog/joining-big-leagues-tuning-jenkins-gc-responsiveness-and-stability
- -XX:+AlwaysPreTouch
- -XX:+UseG1GC
- -XX:+ExplicitGCInvokesConcurrent
- -XX:+ParallelRefProcEnabled
- -XX:+UseStringDeduplication
- -XX:+UnlockDiagnosticVMOptions
- -XX:G1SummarizeRSetStatsPeriod=1
- hosts: jenkins
roles:
- { role: NINEJKH.jenkins }
Licensed under the MIT License. See the LICENSE file for details.