puppet-openstackci/manifests/zuul_merger.pp
Isaac Beckman 5d93d93eca configure zuul with a non-default layout file
Enable to customize zuul with non-default layout file.
This is useful when there are several options for layout
files. All layout files should be available in /etc/zuul/layout

Change-Id: I047b632ebd32a5c7d83ac9a6a64cce6ddb990e8b
2016-06-05 14:10:59 +00:00

72 lines
2.1 KiB
Puppet

# Copyright (c) 2012-2015 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License
# == Class: openstackci::zuul_merger
#
class openstackci::zuul_merger(
$vhost_name = $::fqdn,
$gearman_server = '127.0.0.1',
$gerrit_server = '',
$gerrit_user = '',
$known_hosts_content = '',
$zuul_ssh_private_key = '',
$layout_file_name = 'layout.yaml',
$zuul_url = "http://${::fqdn}/p",
$git_email = 'zuul@domain.example',
$git_name = 'Zuul',
$manage_common_zuul = true,
$revision = 'master',
$git_source_repo = 'https://git.openstack.org/openstack-infra/zuul',
) {
if $manage_common_zuul {
class { '::zuul':
vhost_name => $vhost_name,
gearman_server => $gearman_server,
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
zuul_ssh_private_key => $zuul_ssh_private_key,
layout_file_name => $layout_file_name,
zuul_url => $zuul_url,
git_email => $git_email,
git_name => $git_name,
revision => $revision,
git_source_repo => $git_source_repo,
}
}
class { '::zuul::merger': }
if $known_hosts_content != '' {
file { '/home/zuul/.ssh':
ensure => directory,
owner => 'zuul',
group => 'zuul',
mode => '0700',
require => Class['::zuul'],
}
file { '/home/zuul/.ssh/known_hosts':
ensure => present,
owner => 'zuul',
group => 'zuul',
mode => '0600',
content => $known_hosts_content,
replace => true,
require => File['/home/zuul/.ssh'],
}
}
}