Skip to content

Instantly share code, notes, and snippets.

@ody
Created March 11, 2011 20:13
Show Gist options
  • Save ody/866485 to your computer and use it in GitHub Desktop.
Save ody/866485 to your computer and use it in GitHub Desktop.
mca vim snippet.
snippet mca
module MCollective
module Agent
class ${1:Agentname}<RPC::Agent
metadata
:name => "${2:agentname}",
:description => "Performs $2 actions",
:author => "${3:myname}",
:license => "${4:BSD}",
:version => "${5:0.0.1}",
:url => "${6:http://puppetlabs.com}",
:timeout => ${7:120}
action "${8:query}" do
reply[:result] = ${9:%x{uname -n}}
end
action "${10:update}" do
validate :msg, ${11:String}
reply[:result] = ${12:%x{hostname #{request[:msg]}}}
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment