forked from emmetog/ansible-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
118 lines (90 loc) · 4.39 KB
/
main.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
jenkins_version: "2.73.1" # The exact version of jenkins to deploy
jenkins_hostname: "127.0.0.1" # The hostname that Jenkins will be accessible on
# The port that Jenkins will listen on for unsecured (HTTP) requests. Define to -1 to
# disable HTTP.
jenkins_port: "8080"
# The port that Jenkins will listen on for secured (HTTPS) requests. Define to -1 to
# disable HTTPS. Enabling this option requires a SSL certificate (see below).
jenkins_port_https: "-1"
jenkins_home: /data/jenkins # The directory on the server where the Jenkins configs live
jenkins_admin: "[email protected]" # The administrator email address for the server
# If you need to override any java options then do that here.
jenkins_java_opts: "-Djenkins.install.runSetupWizard=false"
# Configuration files owner and group
jenkins_config_owner: "ubuntu"
jenkins_config_group: "ubuntu"
# The locations of the configuration files for jenkins
jenkins_source_dir_configs: "{{ playbook_dir }}/jenkins-configs"
jenkins_source_dir_jobs: "{{ jenkins_source_dir_configs }}/jobs"
# When defined, include this task file after configuring jobs. This happens
# at the very end of the role, but before Jenkins is taken out of quiet mode.
jenkins_after_config_jobs_file: ""
# config.xml template source
jenkins_source_config_xml: "{{ jenkins_source_dir_configs }}/config.xml"
# Include custom files for jenkins installation
jenkins_include_custom_files: false
jenkins_custom_files: {} # src and dest names
# Include secrets directory during installation
jenkins_include_secrets: false
jenkins_source_secrets: "{{ jenkins_source_dir_configs }}/secrets/"
# The names of the jobs (config.xml must exist under jenkins_source_dir_jobs/job_name/)
jenkins_jobs: []
# List of plugins to install in the Jenkins instance
jenkins_plugins: []
# How long to wait for installing plugins, in seconds. If you are seeing failures in the
# "Wait for plugins to finish installing" task with an error message like "Timeout when
# waiting for file <plugin_name.jpi>", you may want to increase this value.
jenkins_plugin_timeout: 300
# List of sources of custom jenkins plugins to install
jenkins_custom_plugins: []
#######################
# Authentication vars #
#######################
# Mechanism to use when authenticating to Jenkins. Must be one of the following values:
# - api: Use an API token which belongs to a specific user
# - crumb: Use anonymous crumb-based authentication
# - none: No security (not recommended)
# For more information, please refer to the "Authentication and Security" section of the
# README.
jenkins_auth: "crumb"
# When defined, use this API token instead of getting a crumb from the system. Requires
# jenkins_api_username.
jenkins_api_token: ""
# Username which owns the above API token.
jenkins_api_username: ""
#########################################
# SSL vars: apply to Jenkins HTTPS only #
#########################################
# See https://wiki.jenkins.io/display/JENKINS/Starting+and+Accessing+Jenkins for more info
# Jenkins JKS keystore file. Mutually exclusive with the certificate/private key options.
jenkins_https_keystore: ""
# Jenkins JKS keystore password.
jenkins_https_keystore_password: ""
# Jenkins CA signed certificate file. Mutually exclusive with the keystore options.
jenkins_https_certificate: ""
# Jenkins CA signed certificate private key.
jenkins_https_private_key: ""
# Set to false if you are using a self-signed certificate and wish to ignore any
# certificate verification errors from Ansible.
jenkins_https_validate_certs: true
###################################################
# Docker vars: apply to deploying via docker only #
###################################################
# The docker hub image name
jenkins_docker_image: "jenkins/jenkins"
# Configs specific to the "docker" method of running jenkins
# The name of the jenkins container
jenkins_docker_container_name: jenkins
# Default, if true, the port will be exposed on the host (using "port")
# If set to false, the port will only be exposed to other containers (using "expose")
jenkins_docker_expose_port: true
#############################################
# Apt vars: apply to deploying via apt only #
#############################################
# Packages which are to be installed on the jenkins instance
jenkins_apt_packages:
- openjdk-8-jdk
# Java version to use. Note that JDK 8 is required for Jenkins
# 2.54 or greater.
jenkins_java_version: "java-1.8.0-openjdk-amd64"