7d8c838038
Change-Id: Idd712a8ee5ec81c6b88b7d3e2270dce4da254927 Reviewed-on: https://review.openstack.org/10838 Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
27 lines
677 B
Puppet
27 lines
677 B
Puppet
define planet::site($git_url, $vhost_name="planet.${name}.org") {
|
|
|
|
include apache
|
|
include remove_nginx
|
|
|
|
apache::vhost { $vhost_name:
|
|
port => 80,
|
|
priority => '50',
|
|
docroot => "/srv/planet/${name}",
|
|
require => File["/srv/planet"],
|
|
}
|
|
|
|
vcsrepo { "/var/lib/planet/${name}":
|
|
ensure => present,
|
|
provider => git,
|
|
source => $git_url,
|
|
require => File['/var/lib/planet'],
|
|
}
|
|
|
|
cron { "update_planet_${name}":
|
|
user => root,
|
|
minute => "*/5",
|
|
command => "date >> /var/log/planet/${name}.log && cd /var/lib/planet/${name} && git pull -q --ff-only && planet /var/lib/planet/${name}/planet.ini >> /var/log/planet/${name}.log 2>&1"
|
|
}
|
|
|
|
}
|