aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-04-12 15:16:05 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-04-12 15:16:05 -0300
commit40f466eaaab73248a8d45b8e0f520ff3fe8f89cd (patch)
tree47a99bb5f1d55b4754063c83cf5b86bf1ebcd7bd /manifests
parent5e9c822511af4c1ce1ca856242525f25b1a23447 (diff)
downloadpuppet-memcached-40f466eaaab73248a8d45b8e0f520ff3fe8f89cd.tar.gz
puppet-memcached-40f466eaaab73248a8d45b8e0f520ff3fe8f89cd.tar.bz2
Initial module codeHEADmaster
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp27
1 files changed, 27 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..f03cb5f
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,27 @@
+class memcached(
+ $ensure = 'present',
+) {
+ package { 'memcached':
+ ensure => $ensure,
+ }
+
+ service { 'memcached':
+ ensure => $ensure ? {
+ 'present' => running,
+ default => stopped,
+ },
+ require => [ Package['memcached'] ],
+ }
+
+ file { '/etc/memcached.conf':
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ source => [ "puppet:///modules/site_memcached/${::hostname}.conf",
+ "puppet:///modules/site_memcached/memcached.conf",
+ "puppet:///modules/memcached/memcached.conf",
+ ],
+ ensure => $ensure,
+ notify => Service['memcached'],
+ }
+}