Skip to content

Commit

Permalink
Merge pull request honza#297 from jby/puppet-snippets
Browse files Browse the repository at this point in the history
Some extensions to service and, primarily, file snippet for puppet
  • Loading branch information
honza committed Dec 2, 2013
2 parents 80eae35 + b4bbb98 commit c8faad0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions snippets/puppet.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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}'], ],
}

0 comments on commit c8faad0

Please sign in to comment.