]> gitweb.fluxo.info Git - puppet-qwebirc.git/commitdiff
Recompile when config is changed
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Jul 2012 01:29:24 +0000 (22:29 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 20 Jul 2012 01:29:24 +0000 (22:29 -0300)
manifests/init.pp

index fd1aa3401eef45cef0aa293d0916345bbabccc05..daaba2e90fa5cec55141f69f9a234236228088b7 100644 (file)
@@ -47,10 +47,8 @@ class qwebirc($ircserver = 'irc.myserver.com', $ircport = '6667', $realname = 'h
     mode    => 0640,
     content => template('qwebirc/config.py.erb'),
     require => Vcsrepo['/var/lib/qwebirc'],
-    notify  => Service['qwebirc'],
   }
 
-  # TODO: should run after every config change
   exec { '/var/lib/qwebirc/compile.py':
     cwd     => '/var/lib/qwebirc',
     creates => '/var/lib/qwebirc/.compiled',
@@ -60,6 +58,13 @@ class qwebirc($ircserver = 'irc.myserver.com', $ircport = '6667', $realname = 'h
     notify  => Service['qwebirc'],
   }
 
+  exec { '/bin/rm -r /var/lib/qwebirc/.compiled':
+    user        => 'qwebirc',
+    group       => 'qwebirc',
+    subscribe   => File['/var/lib/qwebirc/config.py'],
+    refreshonly => true,
+  }
+
   # TODO: check why status is not working
   service { 'qwebirc':
     enable     => true,