summaryrefslogtreecommitdiff
path: root/manifests/cache.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-10-26 16:22:34 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-10-26 16:22:34 -0200
commit29016ba83e0b651a12fe4beeafd55b2ab5f58e28 (patch)
treeac282a96ca2ae93bb14c082ebddbffe6032d9b0c /manifests/cache.pp
parenta8c51500710892d097ebe4e86cfe0cc72f31a3f2 (diff)
downloadpuppet-nginx-29016ba83e0b651a12fe4beeafd55b2ab5f58e28.tar.gz
puppet-nginx-29016ba83e0b651a12fe4beeafd55b2ab5f58e28.tar.bz2
Adds nginx::cache and moves nginx::base::site to nginx::site
Diffstat (limited to 'manifests/cache.pp')
-rw-r--r--manifests/cache.pp16
1 files changed, 16 insertions, 0 deletions
diff --git a/manifests/cache.pp b/manifests/cache.pp
new file mode 100644
index 0000000..6ba4464
--- /dev/null
+++ b/manifests/cache.pp
@@ -0,0 +1,16 @@
+class nginx::cache {
+ file { '/var/cache/nginx':
+ ensure => directory,
+ }
+
+ file { '/etc/nginx/conf.d/cache.conf' :
+ ensure => present,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ content => template('/etc/puppet/templates/template'),
+ content => "proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g;\n",
+ require => File['/var/cache/nginx'],
+ notify => Service['nginx'],
+ }
+}