# Copyright 2017 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: zuul::web # class zuul::web ( $ensure = undef, $manage_log_conf = true, $web_listen_address = '127.0.0.1', $web_listen_port = 9000, ) { service { 'zuul-web': ensure => $ensure, name => 'zuul-web', enable => true, hasrestart => true, require => [File['/etc/init.d/zuul-web'], Class['zuul::systemd_reload']] } file { '/etc/init.d/zuul-web': ensure => present, owner => 'root', group => 'root', mode => '0555', source => 'puppet:///modules/zuul/zuul-web.init', notify => Class['zuul::systemd_reload'], } if $manage_log_conf { file { '/etc/zuul/web-logging.conf': ensure => present, source => 'puppet:///modules/zuul/web-logging.conf', } } include ::logrotate ::logrotate::file { 'web.log': log => '/var/log/zuul/web.log', options => [ 'compress', 'missingok', 'rotate 30', 'daily', 'notifempty', ], require => Service['zuul-web'], } ::logrotate::file { 'web-debug.log': log => '/var/log/zuul/web-debug.log', options => [ 'compress', 'missingok', 'rotate 30', 'daily', 'notifempty', ], require => Service['zuul-web'], } }