case "$(facter operatingsystem)" in
Ubuntu)
- apt-get update
# make sure that the ca-certs are properly updated
/usr/sbin/update-ca-certificates
# attach to the fd.io.dev apt repo
- echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+# echo 'deb http://nexus.fd.io/content/repositories/fd.io.dev/ ./' >> /etc/apt/sources.list
+
+ # Configure Ubuntu mirror
+ perl -pi -e 'unless(m{(security|fd\.io)}){ s{://[^/]+/}{://ca.archive.ubuntu.com/} }' /etc/apt/sources.list
;;
*)
# Do nothing on other distros for now
jenkins hard nofile 16000
EOF
+cat <<EOJENKINS_SUDO >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins ALL = NOPASSWD: ALL
+EOJENKINS_SUDO
+
cat <<EOSSH >> /etc/ssh/ssh_config
Host *
ServerAliveInterval 60