Ansible role for installing and configuring Jenkins 2

165 views
Skip to first unread message

Karl Davis

unread,
Apr 20, 2016, 11:41:10 PM4/20/16
to Jenkins Users
Evening all,

Just wanted to put this Ansible role I created for Jenkins 2 out there: https://github.com/karlmdavis/ansible-jenkins2. I initially tried to use/adapt some of the existing roles from other folks, but was running into too many problems with them, so started from scratch.

So far, this handles the following:
  • Ubuntu (probably Debian, too) support.
  • Allows customization of Jenkins prefix and port.
  • Enables the Jenkins CLI.
  • Copes with Jenkins 2's more secure authentication-required-by-default stance.
  • Disables the new first run setup wizard.
  • Installs the recommended plugins from that wizard, and allows role users to specify other plugins to install, too.


This has already been a fun little project to work on, and I hope other folks find it useful. I've got some more work to do on it later next week, but it's already usable enough for anyone using Ansible that wants to start playing with Jenkins 2.


DevOps All the Things!

Karl M. Davis

Daniel Beck

unread,
Apr 21, 2016, 5:46:24 AM4/21/16
to jenkins...@googlegroups.com

> On 21.04.2016, at 05:41, Karl Davis <ka...@davisonlinehome.name> wrote:
>
> • Enables the Jenkins CLI.
>

You may be interested in the system property jenkins.model.Jenkins.slaveAgentPort, which makes it easier to set the default for this. The difference is, it does not override user configuration, which may or may not be what you prefer.

Karl Davis

unread,
May 3, 2016, 9:33:43 AM5/3/16
to Jenkins Users, m...@beckweb.net
Daniel,

Thanks very much for the tip! At this point, it's just easier to leave my init.d script solution for this in place, but if I were to start over from scratch, I'd definitely use your (simpler) suggestion.

And congrats on getting 2.0 out the door! I'm super jazzed about all the new capabilities in it.

Best regards,
Karl M. Davis

A Drake

unread,
Aug 24, 2017, 3:44:39 AM8/24/17
to Jenkins Users
Karl, this was extremely helpful. THanks very much.
Reply all
Reply to author
Forward
0 new messages