-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
42 lines (37 loc) · 997 Bytes
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- hosts: all
pre_tasks:
- apt: update_cache=yes
roles:
- role: geerlingguy.java
java_packages:
- openjdk-7-jre
- role: geerlingguy.jenkins
jenkins_plugins:
- ansicolor
- build-pipeline-plugin
- envinject
- git
- greenballs
- role: geerlingguy.ruby
ruby_install_gems:
- bundler
ruby_install_from_source: yes
ruby_download_url: http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.gz
ruby_version: 2.2.1
post_tasks:
- name: Copy jenkins tasks to /var/lib/jenkins/jobs
copy:
src: files/jenkins-jobs/MyCoolApp
dest: /var/lib/jenkins/jobs
owner: jenkins
group: jenkins
mode: 0644
directory_mode: 0755
notify: restart jenkins
- name: Add user 'jenkins' to password-less sudoers
lineinfile:
dest: /etc/sudoers
regexp: ^jenkins
line: "jenkins ALL=(ALL) NOPASSWD: ALL"
become: yes