From b4bbb981208dcf8ff0ed442d495dc155e255bcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bygd=C3=A9n?= Date: Sun, 1 Dec 2013 23:21:31 +0100 Subject: [PATCH] Some extensions to service and, primarily, file snippet for puppet --- snippets/puppet.snippets | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/snippets/puppet.snippets b/snippets/puppet.snippets index d35608d..2e451e4 100644 --- a/snippets/puppet.snippets +++ b/snippets/puppet.snippets @@ -223,14 +223,22 @@ snippet define } snippet service - service{ "${1:service}": - enable => ${2:true}, - ensure => ${0:running}, - hasstatus => true, + service { '${1:service}' : + ensure => running, + enable => true, + require => [ Package['${2:package}'], File['${3:file}'], ], + subscribe => [ File['${4:configfile1}'], File['${5:configfile2}'], Package['${6:package}'], ] } snippet file - file{ "${1:path}": - ${2} => ${0} + file { '${1:filename}' : + ensure => ${2:present}, + owner => '${3:root}', + group => '${4:root}', + mode => '${5:0644}', + source => 'puppet:///modules/${6:module}/${7:source}', + content => template('/etc/puppet/templates/${8:template}'), + alias => '${9:alias}', + require => [ Package['${10:package}'], File['${11:file}'], ], }