Run a command with Puppet

Despite all the types and modelling available sometimes you just want puppet to run a command.

1

Votes

class basic_exec {

  exec { 'refresh_cache':
    command => 'refresh_cache 8600',
    path    => '/usr/local/bin/:/bin/',
    # path    => [ '/usr/local/bin/', '/bin/' ],  # alternative syntax
  }

}

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise

DevOpsnipp.com © 2020

medium.png