summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-07-19 22:29:24 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-07-19 22:29:24 -0300
commit1de335ada720dff4a9596164913edd1f927b9bb0 (patch)
tree6df5099da77b6f20771479a8825433d91f927c07
parent4eaecf2afe6139b9fe69ed4844421d9be05e3dc1 (diff)
downloadpuppet-qwebirc-1de335ada720dff4a9596164913edd1f927b9bb0.tar.gz
puppet-qwebirc-1de335ada720dff4a9596164913edd1f927b9bb0.tar.bz2
Recompile when config is changed
-rw-r--r--manifests/init.pp9
1 files changed, 7 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index fd1aa34..daaba2e 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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,