59 lines
1.4 KiB
Python
59 lines
1.4 KiB
Python
defaults = {
|
|
'apt': {
|
|
'repos': {
|
|
'jenkins': {
|
|
'items': {
|
|
'deb https://pkg.jenkins.io/{os}-stable binary/',
|
|
},
|
|
},
|
|
},
|
|
'packages': {
|
|
'openjdk-11-jre': {},
|
|
'jenkins': {
|
|
'needs': {
|
|
'pkg_apt:openjdk-11-jre',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
'backups': {
|
|
'paths': {
|
|
'/var/lib/jenkins',
|
|
},
|
|
},
|
|
'zfs': {
|
|
'datasets': {
|
|
'tank/jenkins': {
|
|
'mountpoint': '/var/lib/jenkins',
|
|
'needed_by': {
|
|
'pkg_apt:jenkins',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'nginx/vhosts/jenkins-ci',
|
|
)
|
|
def nginx(metadata):
|
|
if not node.has_bundle('nginx'):
|
|
raise DoNotRunAgain
|
|
|
|
return {
|
|
'nginx': {
|
|
'vhosts': {
|
|
'jenkins-ci': {
|
|
'domain': metadata.get('jenkins-ci/domain'),
|
|
'locations': {
|
|
'/': {
|
|
'target': 'http://localhost:22010/',
|
|
},
|
|
},
|
|
'website_check_path': '/login',
|
|
'website_check_string': 'Welcome to Jenkins',
|
|
},
|
|
},
|
|
},
|
|
}
|