]> git.r.bdr.sh - rbdr/dotfiles/blame - vim/snippets/puppet.snippets
Add simplified modules
[rbdr/dotfiles] / vim / snippets / puppet.snippets
CommitLineData
0d23b6e5
BB
1# vim: nofoldenable foldmethod=manual
2snippet file
3 file {
4 "${1:filename}":
5 ensure => "${3:file}",
6 source => "puppet:///${2:source}",
7 owner => "${4:root}",
8 group => "${5:root}",
9 mode => '${6:0755}';
10 }
11snippet exec
12 exec {
13 "${1:name}":
14 command => "${2:command}",
15 refreshonly => "${3:true}",
16 onlyif => "${4:run_if_true}",
17 unless => "${5:run_if_false}",
18 }
19snippet encap
20 encap {
21 "${1:package_name}":
22 ensure => "${2:package_version}";
23 }
24snippet package
25 package {
26 "${1:package_name}":
27 ensure => "${2:installed}";
28 provider => "yum",
29 }
30snippet tidy
31 tidy {
32 "${1:directory}":
33 age => "${2:0}",
34 matches => [ "${3:pattern}" ],
35 recurse => "${4:true}",
36 rmdirs => "${5:true}";
37 }
38snippet cron
39 cron {
40 "${1:name}":
41 command => "${2:command}",
42 hour => ${3:hour},
43 minute => ${4:minute},
44 day => ${5:day};
45 }
46snippet class
47 # Class:: $1
48 #
49 #
50 class ${1:classname} {
51 ${2:#code...}
52 } # Class:: $1
53snippet def
54 # Define:: $1
55 # Args:: $2
56 #
57 define ${1:defname}(${2:args}) {
58 ${3:#code}
59 } # Define: $1
60snippet inc
61 include "${1}"
62snippet #head
63 # Module:: ${1:modulename}
64 # Manifest:: ${2:init.pp}
65 #
66 # Author:: `system("git config user.name")` (<`system("git config user.email")`>)
67 # Date:: `system("ruby -e 'puts Time.now'")`
68 #
69 ${3}
70snippet #class
71 # Module:: ${1:modulename}
72 # Class: ${2:classname}
73 #
74 # ${3:description}
75 #
76 # Author:: `system("git config user.name")` (<`system("git config user.email")`>)
77 # Date:: `system("ruby -e 'puts Time.now'")`
78 #
79 class $1::$2
80 {
81
82 }