/usr/share/mcollective/plugins/mcollective/agent/service.ddl is in mcollective-plugins-service 0.0.0~git20120507.df2fa81-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | metadata :name => "Service Agent",
:description => "Start and stop system services",
:author => "R.I.Pienaar",
:license => "ASL2",
:version => "1.2",
:url => "https://github.com/puppetlabs/mcollective-plugins",
:timeout => 60
action "status", :description => "Gets the status of a service" do
display :always
input :service,
:prompt => "Service Name",
:description => "The service to get the status for",
:type => :string,
:validation => '^[a-zA-Z\.\-_\d]+$',
:optional => false,
:maxlength => 90
output "status",
:description => "The status of the service",
:display_as => "Service Status"
end
["stop", "start", "restart"].each do |act|
action act, :description => "#{act.capitalize} a service" do
display :failed
input :service,
:prompt => "Service Name",
:description => "The service to #{act}",
:type => :string,
:validation => '^[a-zA-Z\.\-_\d]+$',
:optional => false,
:maxlength => 90
output "status",
:description => "The status of the service after #{act.sub(/p$/, 'pp')}ing",
:display_as => "Service Status"
end
end
|