puppet: Use exec's 'creates' parameter instead of onlyif

(imported from commit 94b5e76ca5119443f143e4af5c86e3c16c99dc1e)
This commit is contained in:
Zev Benjamin
2013-02-07 18:03:07 -05:00
parent a7ca48e2ff
commit 3e7a6619bd
3 changed files with 7 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ class humbug::app_frontend {
exec {"pip6": exec {"pip6":
command => "/usr/bin/pip install django-pipeline", command => "/usr/bin/pip install django-pipeline",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/django-pipeline" creates => "/usr/local/lib/python2.6/dist-packages/django-pipeline"
} }
# TODO: Add /usr/lib/nagios/plugins/check_send_receive_time -> # TODO: Add /usr/lib/nagios/plugins/check_send_receive_time ->

View File

@@ -11,23 +11,23 @@ class humbug::base {
# FIXME: Stop using pip since it is insecure # FIXME: Stop using pip since it is insecure
exec {"pip": exec {"pip":
command => "/usr/bin/pip install django-jstemplate", command => "/usr/bin/pip install django-jstemplate",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/jstemplate" creates => "/usr/local/lib/python2.6/dist-packages/jstemplate"
} }
exec {"pip2": exec {"pip2":
command => "/usr/bin/pip install markdown", command => "/usr/bin/pip install markdown",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/markdown" creates => "/usr/local/lib/python2.6/dist-packages/markdown"
} }
exec {"pip3": exec {"pip3":
command => "/usr/bin/pip install requests", command => "/usr/bin/pip install requests",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/requests" creates => "/usr/local/lib/python2.6/dist-packages/requests"
} }
exec {"pip4": exec {"pip4":
command => "/usr/bin/pip install pika", command => "/usr/bin/pip install pika",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/pika" creates => "/usr/local/lib/python2.6/dist-packages/pika"
} }
exec {"pip5": exec {"pip5":
command => "/usr/bin/pip install South", command => "/usr/bin/pip install South",
onlyif => "test ! -d /usr/local/lib/python2.6/dist-packages/south" creates => "/usr/local/lib/python2.6/dist-packages/south"
} }
group { 'humbug': group { 'humbug':

View File

@@ -52,5 +52,6 @@ class humbug::postgres {
exec { "disable_logrotate": exec { "disable_logrotate":
command => "/usr/bin/dpkg-divert --rename --divert /etc/logrotate.d/postgresql-common.disabled --add /etc/logrotate.d/postgresql-common", command => "/usr/bin/dpkg-divert --rename --divert /etc/logrotate.d/postgresql-common.disabled --add /etc/logrotate.d/postgresql-common",
creates => '/etc/logrotate.d/postgresql-common.disabled',
} }
} }