-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins.yml
49 lines (41 loc) · 1.47 KB
/
jenkins.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
43
44
45
46
47
48
49
# Copyright (C) 2019 DevOps, SIA. - All Rights Reserved
# You may use, distribute and modify this code under the
# terms of the Apache License Version 2.0.
# http://www.apache.org/licenses
---
- hosts: all
become: yes
become_method: sudo
vars:
java_packages:
- openjdk-11-jdk
jenkins_java_options: "-Djenkins.install.runSetupWizard=false"
nginx_remove_default_vhost: true
nginx_vhosts:
- listen: "80 default_server"
server_name: "localhost"
state: "present"
filename: "jenkins.conf"
extra_parameters: |
server_tokens off;
if ($http_x_forwarded_proto = 'http') {
return 301 https://$host$request_uri;
}
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_request_buffering off;
}
roles:
- geerlingguy.nginx
- geerlingguy.java
- geerlingguy.jenkins