summaryrefslogtreecommitdiff
path: root/manifests/cache.pp
diff options
context:
space:
mode:
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'],
+ }
+}