Create a directory with Puppet

Create a directory with Puppet.

1

Votes

class directories {

  # create a directory
  file { '/etc/site-conf':
    ensure => 'directory',
  }

  # a fuller example, including permissions and ownership
  file { '/var/log/admin-app-log':
    ensure => 'directory',
    owner  => 'root',
    group  => 'wheel',
    mode   => '0750',
  }

  # this example is incorrect and creates a file
  file { '/etc/site-conf/':
    ensure => 'present',
  }
}

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