Applied puppet style guide
This commit is contained in:
parent
22b1a14cbf
commit
7c3dc8a874
@ -90,7 +90,7 @@ snippet class
|
||||
${0}
|
||||
}
|
||||
snippet node
|
||||
node "${1:`vim_snippets#Filename('', 'fqdn')`}" {
|
||||
node '${1:`vim_snippets#Filename('', 'fqdn')`}' {
|
||||
${0}
|
||||
}
|
||||
snippet case
|
||||
@ -122,99 +122,99 @@ snippet [
|
||||
snippet >
|
||||
${1} => ${0}
|
||||
snippet p:
|
||||
"puppet://puppet/${1:module name}/${0:file name}"
|
||||
'puppet://puppet/${1:module name}/${0:file name}'
|
||||
#
|
||||
# Functions
|
||||
snippet alert
|
||||
alert("${1:message}")
|
||||
alert('${1:message}')
|
||||
snippet crit
|
||||
crit("${1:message}")
|
||||
crit('${1:message}')
|
||||
snippet debug
|
||||
debug("${1:message}")
|
||||
debug('${1:message}')
|
||||
snippet defined
|
||||
defined(${1:Resource}["${2:name}"])
|
||||
defined(${1:Resource}['${2:name}'])
|
||||
snippet emerg
|
||||
emerg("${1:message}")
|
||||
emerg('${1:message}')
|
||||
snippet extlookup Simple extlookup
|
||||
extlookup("${1:variable}")
|
||||
extlookup('${1:variable}')
|
||||
snippet extlookup Extlookup with defaults
|
||||
extlookup("${1:variable}", "${2:default}")
|
||||
extlookup('${1:variable}', '${2:default}')
|
||||
snippet extlookup Extlookup with defaults and custom data file
|
||||
extlookup("${1:variable}", "${2:default}", "${3:data source}")
|
||||
extlookup('${1:variable}', '${2:default}', '${3:data source}')
|
||||
snippet fail
|
||||
fail("${1:message}")
|
||||
fail('${1:message}')
|
||||
snippet info
|
||||
info("${1:message}")
|
||||
info('${1:message}')
|
||||
snippet inline_template
|
||||
inline_template("<%= ${1} %>")
|
||||
inline_template('<%= ${1} %>')
|
||||
snippet notice
|
||||
notice("${1:message}")
|
||||
notice('${1:message}')
|
||||
snippet realize
|
||||
realize(${1:Resource}[${2:name}])
|
||||
snippet regsubst
|
||||
regsubst(${1:hay stack}, ${2:needle}, "${3:replacement}")
|
||||
regsubst(${1:hay stack}, ${2:needle}, '${3:replacement}')
|
||||
snippet inc
|
||||
include ${1:classname}
|
||||
snippet split
|
||||
split(${1:hay stack}, "${2:patten}")
|
||||
split(${1:hay stack}, '${2:patten}')
|
||||
snippet versioncmp
|
||||
versioncmp("${1:version}", "${2:version}")
|
||||
versioncmp('${1:version}', '${2:version}')
|
||||
snippet warning
|
||||
warning("${1:message}")
|
||||
warning('${1:message}')
|
||||
#
|
||||
# Types
|
||||
snippet cron
|
||||
cron{ "${1:name}":
|
||||
command => "${2}",
|
||||
user => "${3:root}",
|
||||
${4} => ${0}
|
||||
cron { '${1:name}':
|
||||
command => '${2}',
|
||||
user => '${3:root}',
|
||||
${4} => ${0},
|
||||
}
|
||||
|
||||
snippet exec
|
||||
exec{ "${1:name}":
|
||||
command => "${2:$1}",
|
||||
user => "${3:root}",
|
||||
${4} => ${0}
|
||||
exec { '${1:name}':
|
||||
command => '${2:$1}',
|
||||
user => '${3:root}',
|
||||
${4} => ${0},
|
||||
}
|
||||
|
||||
snippet user
|
||||
user{ "${1:user}":
|
||||
comment => "${2:$1}",
|
||||
user { '${1:user}':
|
||||
ensure => present,
|
||||
comment => '${2:$1}',
|
||||
managehome => true,
|
||||
home => "${0:/home/$1}"
|
||||
home => '${0:/home/$1}',
|
||||
}
|
||||
|
||||
snippet group
|
||||
group{ "${1:group}":
|
||||
ensure => ${0:present}
|
||||
group { '${1:group}':
|
||||
ensure => ${0:present},
|
||||
}
|
||||
|
||||
snippet host
|
||||
host{ "${1:hostname}":
|
||||
ip => ${0:127.0.0.1}
|
||||
host { '${1:hostname}':
|
||||
ip => ${0:127.0.0.1},
|
||||
}
|
||||
|
||||
snippet mailalias
|
||||
mailalias{ "${1:localpart}":
|
||||
recipient => "${0:recipient}"
|
||||
mailalias { '${1:localpart}':
|
||||
recipient => '${0:recipient}',
|
||||
}
|
||||
|
||||
snippet mount
|
||||
mount{ "${1:destination path}":
|
||||
mount { '${1:destination path}':
|
||||
ensure => ${2:mounted},
|
||||
device => "${0:device name or path}"
|
||||
device => '${0:device name or path}',
|
||||
}
|
||||
|
||||
snippet package
|
||||
package{ "${1:package name}":
|
||||
ensure => ${0:present}
|
||||
package { '${1:package name}':
|
||||
ensure => ${0:present},
|
||||
}
|
||||
|
||||
snippet yumrepo
|
||||
yumrepo{ "${1:repo name}":
|
||||
descr => "${2:$1}",
|
||||
enabled => ${0:1}
|
||||
yumrepo { '${1:repo name}':
|
||||
Descr => '${2:$1}',
|
||||
enabled => ${0:1},
|
||||
}
|
||||
|
||||
snippet define
|
||||
@ -227,7 +227,7 @@ snippet service
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => [ Package['${2:package}'], File['${3:file}'], ],
|
||||
subscribe => [ File['${4:configfile1}'], File['${5:configfile2}'], Package['${6:package}'], ]
|
||||
subscribe => [ File['${4:configfile1}'], File['${5:configfile2}'], Package['${6:package}'], ],
|
||||
}
|
||||
|
||||
snippet file
|
||||
|
Loading…
Reference in New Issue
Block a user