Skip to content

Instantly share code, notes, and snippets.

@acidprime
Created July 8, 2015 23:45
Show Gist options
  • Save acidprime/848acd2d7845f323e03f to your computer and use it in GitHub Desktop.
Save acidprime/848acd2d7845f323e03f to your computer and use it in GitHub Desktop.
Restart a service with puppet
#!/opt/puppetlabs/puppet/bin/ruby
require 'puppet'
service = Puppet::Type.type(:service).new({:name => 'puppet'}).provider
service.restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment