Merge pull request #508 from slebedev/master

[puppet.snippet]: s/'/"/ in most of snippets, changes in 'file' snippet ...
This commit is contained in:
Louis Pilfold 2015-01-26 09:23:22 +00:00
commit 588cf86e5b

View File

@ -90,7 +90,7 @@ snippet class
${0} ${0}
} }
snippet node snippet node
node '${1:`vim_snippets#Filename('', 'fqdn')`}' { node "${1:`vim_snippets#Filename('', 'fqdn')`}" {
${0} ${0}
} }
snippet case snippet case
@ -107,13 +107,21 @@ snippet if
if $${1:variable} { if $${1:variable} {
${0} ${0}
} }
snippet ifd
if defined(${1:Resource}["${2:name}"]) {
${0}
}
snippet ifnd
if !defined(${1:Resource}["${2:name}"]) {
${0}
}
snippet el snippet el
else { else {
${0} ${0}
} }
snippet ? snippet ?
? { ? {
'${1}' => ${0} "${1}" => ${0}
} }
# #
# blocks etc and general syntax sugar # blocks etc and general syntax sugar
@ -122,98 +130,98 @@ snippet [
snippet > snippet >
${1} => ${0} ${1} => ${0}
snippet p: snippet p:
'puppet://puppet/${1:module name}/${0:file name}' "puppet://puppet/${1:module name}/${0:file name}"
# #
# Functions # Functions
snippet alert snippet alert
alert('${1:message}') alert("${1:message}")
snippet crit snippet crit
crit('${1:message}') crit("${1:message}")
snippet debug snippet debug
debug('${1:message}') debug("${1:message}")
snippet defined snippet defined
defined(${1:Resource}['${2:name}']) defined(${1:Resource}["${2:name}"])
snippet emerg snippet emerg
emerg('${1:message}') emerg("${1:message}")
snippet extlookup Simple extlookup snippet extlookup Simple extlookup
extlookup('${1:variable}') extlookup("${1:variable}")
snippet extlookup Extlookup with defaults snippet extlookup Extlookup with defaults
extlookup('${1:variable}', '${2:default}') extlookup("${1:variable}", "${2:default}")
snippet extlookup Extlookup with defaults and custom data file 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 snippet fail
fail('${1:message}') fail("${1:message}")
snippet info snippet info
info('${1:message}') info("${1:message}")
snippet inline_template snippet inline_template
inline_template('<%= ${1} %>') inline_template("<%= ${1} %>")
snippet notice snippet notice
notice('${1:message}') notice("${1:message}")
snippet realize snippet realize
realize(${1:Resource}[${2:name}]) realize(${1:Resource}[${2:name}])
snippet regsubst snippet regsubst
regsubst(${1:hay stack}, ${2:needle}, '${3:replacement}') regsubst(${1:hay stack}, ${2:needle}, "${3:replacement}")
snippet inc snippet inc
include ${1:classname} include ${1:classname}
snippet split snippet split
split(${1:hay stack}, '${2:patten}') split(${1:hay stack}, "${2:patten}")
snippet versioncmp snippet versioncmp
versioncmp('${1:version}', '${2:version}') versioncmp("${1:version}", "${2:version}")
snippet warning snippet warning
warning('${1:message}') warning("${1:message}")
# #
# Types # Types
snippet cron snippet cron
cron { '${1:name}': cron { "${1:name}":
command => '${2}', command => "${2}",
user => '${3:root}', user => "${3:root}",
${4} => ${0}, ${4} => ${0},
} }
snippet exec snippet exec
exec { '${1:name}': exec { "${1:name}":
command => '${2:$1}', command => "${2:$1}",
user => '${3:root}', user => "${3:root}",
${4} => ${0}, ${4} => ${0},
} }
snippet user snippet user
user { '${1:user}': user { "${1:user}":
ensure => present, ensure => present,
comment => '${2:$1}', comment => "${2:$1}",
managehome => true, managehome => true,
home => '${0:/home/$1}', home => "${0:/home/$1}",
} }
snippet group snippet group
group { '${1:group}': group { "${1:group}":
ensure => ${0:present}, ensure => ${0:present},
} }
snippet host snippet host
host { '${1:hostname}': host { "${1:hostname}":
ip => ${0:127.0.0.1}, ip => ${0:127.0.0.1},
} }
snippet mailalias snippet mailalias
mailalias { '${1:localpart}': mailalias { "${1:localpart}":
recipient => '${0:recipient}', recipient => "${0:recipient}",
} }
snippet mount snippet mount
mount { '${1:destination path}': mount { "${1:destination path}":
ensure => ${2:mounted}, ensure => ${2:mounted},
device => '${0:device name or path}', device => "${0:device name or path}",
} }
snippet package snippet package
package { '${1:package name}': package { "${1:package name}":
ensure => ${0:present}, ensure => ${0:present},
} }
snippet yumrepo snippet yumrepo
yumrepo { '${1:repo name}': yumrepo { "${1:repo name}":
Descr => '${2:$1}', Descr => "${2:$1}",
enabled => ${0:1}, enabled => ${0:1},
} }
@ -223,22 +231,39 @@ snippet define
} }
snippet service snippet service
service { '${1:service}' : service { "${1:service}" :
ensure => running, ensure => running,
enable => true, enable => true,
require => [ Package['${2:package}'], File['${3:file}'], ], 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 snippet file
file { '${1:filename}' : file { "${1:filename}" :
ensure => ${2:present}, ensure => ${2:present},
owner => '${3:root}', owner => "${3:root}",
group => '${4:root}', group => "${4:root}",
mode => '${5:0644}', mode => "${5:0644}",
source => 'puppet:///modules/${6:module}/${7:source}', source => "puppet:///modules/${6:module}/${7:source}",
content => template('/etc/puppet/templates/${8:template}'), content => template("${8:module}/${9:template}"),
alias => '${9:alias}', alias => "${10:alias}",
require => [ Package['${10:package}'], File['${11:file}'], ], require => [ Package["${11:package}"], File["${12:file}"], ],
}
snippet archive
archive { "${1:filename}" :
ensure => ${2:present},
url => "http://${3:url}",
extension => "${4:tgz}",
target => "${5:target}",
checksum => ${6:false},
src_target => "${7:/tmp}",
}
snippet firewall
firewall { "${1:comment}" :
proto => ${2:tcp},
action => ${3:accept},
port => ${4},
} }