Validate managed files with Puppet

Validate configuration files you are managing - by Puppet.

6

Votes

class valid_config {

  file { '/etc/sudoers':
    ensure       => 'present',
    content      => "root    ALL=(ALL)       ALL",
    validate_cmd => '/sbin/visudo -cf %',
  }

}

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