From 04bffc411afb19a572af34d1a2e0f7029f16dfe4 Mon Sep 17 00:00:00 2001 From: Daniel Lawrence Date: Fri, 29 Nov 2013 09:16:31 +1100 Subject: Added manage_gunicorn flag. This will allow a user to stop the module from trying to do anything with gunicorn. --- manifests/config.pp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 49e5230..fdd808f 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -6,18 +6,19 @@ class python::config { Python::Virtualenv <| |> -> Python::Pip <| |> - if $python::gunicorn { - Class['python::install'] -> Python::Gunicorn <| |> + if $python::manage_gunicorn { + if $python::gunicorn { + Class['python::install'] -> Python::Gunicorn <| |> - Python::Gunicorn <| |> ~> Service['gunicorn'] + Python::Gunicorn <| |> ~> Service['gunicorn'] - service { 'gunicorn': - ensure => running, - enable => true, - hasrestart => true, - hasstatus => false, - pattern => '/usr/bin/gunicorn', + service { 'gunicorn': + ensure => running, + enable => true, + hasrestart => true, + hasstatus => false, + pattern => '/usr/bin/gunicorn', + } } } - } -- cgit v1.2.3 From 535115b9d1426a4d380dc4631fdd2944e0c29e88 Mon Sep 17 00:00:00 2001 From: Neil Saunders Date: Thu, 19 Dec 2013 18:06:25 +0000 Subject: Fixing lint issues as per http://docs.puppetlabs.com/guides/style_guide.html --- manifests/config.pp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 49e5230..52c10be 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,3 +1,18 @@ +# == Define: python::config +# +# Optionally installs the gunicorn service +# +# === Examples +# +# include python::config +# +# === Authors +# +# Sergey Stankevich +# Ashley Penney +# Fotis Gimian +# + class python::config { Class['python::install'] -> Python::Pip <| |> @@ -19,5 +34,4 @@ class python::config { pattern => '/usr/bin/gunicorn', } } - -} +} \ No newline at end of file -- cgit v1.2.3