From 278c6493d7e1f9bb1079a459db057569d69f16fc Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Fri, 21 Dec 2018 15:40:04 +0100 Subject: [PATCH] No longer build index page in puppet-ptgbot Index page used to be shipped and configured in the puppet-ptgbot module itself. Now it is provided by the ptgbot itself and is dynamically generated from JSON data the same way the PTG schedule page is. This avoids the need to update puppet-ptgbot at every event to update the links on that page. They can now be dynamically provided using the ~fetchdb command. Depends-On: https://review.openstack.org/626907 Change-Id: Id5c84cf3d2fcff0e772764e40dea64c1383a85bc --- manifests/init.pp | 30 +++++++++++++++++++++--------- templates/index.html.erb | 25 ------------------------- 2 files changed, 21 insertions(+), 34 deletions(-) delete mode 100644 templates/index.html.erb diff --git a/manifests/init.pp b/manifests/init.pp index 3205225..3ebd360 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,9 +5,6 @@ class ptgbot( $password, $channel, $vhost_name, - $venuemap = 'https://www.openstack.org/assets/ptg/Denver-map.pdf', - $pads = 'https://wiki.openstack.org/wiki/PTG/Stein/Etherpads', - $cityguide = 'https://wiki.openstack.org/wiki/PTG/Stein/CityGuide', ) { include ::pip @@ -96,12 +93,15 @@ class ptgbot( } file { '/var/lib/ptgbot/www/index.html': - ensure => present, - content => template('ptgbot/index.html.erb'), - group => 'root', - mode => '0444', - owner => 'root', - require => File['/var/lib/ptgbot/www'], + ensure => present, + group => 'ptgbot', + mode => '0444', + owner => 'root', + replace => true, + require => [File['/var/lib/ptgbot/www'], + User['ptgbot']], + source => '/opt/ptgbot/html/index.html', + subscribe => Vcsrepo['/opt/ptgbot'], } file { '/var/lib/ptgbot/www/ptg.html': @@ -164,6 +164,18 @@ class ptgbot( subscribe => Vcsrepo['/opt/ptgbot'], } + file { '/var/lib/ptgbot/www/index.js': + ensure => present, + group => 'ptgbot', + mode => '0444', + owner => 'root', + replace => true, + require => [File['/var/lib/ptgbot/www'], + User['ptgbot']], + source => '/opt/ptgbot/html/index.js', + subscribe => Vcsrepo['/opt/ptgbot'], + } + file { '/var/lib/ptgbot/www/jquery-1.9.1.min.js': ensure => present, group => 'ptgbot', diff --git a/templates/index.html.erb b/templates/index.html.erb deleted file mode 100644 index 33062ca..0000000 --- a/templates/index.html.erb +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Quick PTG Resources - - - - - -
-

Quick PTG Resources

-

Follow links to useful sites for the OpenStack Project Teams Gathering.

- -
- - -