# Puppet Class: puppet_cd::puppetdb::dirs

Inherits:
  puppet_cd::params

Defined in:
  manifests/puppetdb/dirs.pp

## Summary

Class manages puppetdb directories

## Overview

puppet_cd::puppetdb::dirs.pp Module name: puppet_cd Author: Arne Teuke (arne_teuke@confdroid)

    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
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    # File 'manifests/puppetdb/dirs.pp', line 6

    class puppet_cd::puppetdb::dirs (

    ) inherits puppet_cd::params {
      if ($fqdn == $pt_puppetdb_server) and ($pt_use_puppetdb == true) {
        require puppet_cd::main::install

        # main directory
        file { $pt_puppetdb_main:
          ensure   => directory,
          path     => $pt_puppetdb_main,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0750',
          selrange => s0,
          selrole  => object_r,
          seltype  => etc_t,
          seluser  => system_u,
        }

        # conf.d directory
        file { $pt_puppetdb_conf_d:
          ensure   => directory,
          path     => $pt_puppetdb_conf_d,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0750',
          selrange => s0,
          selrole  => object_r,
          seltype  => etc_t,
          seluser  => system_u,
        }

        # ssl directory
        file { $pt_puppetdb_ssl:
          ensure   => directory,
          path     => $pt_puppetdb_ssl,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0750',
          selrange => s0,
          selrole  => object_r,
          seltype  => etc_t,
          seluser  => system_u,
        }

        # log dir
        file { $pt_puppetdb_log:
          ensure   => directory,
          path     => $pt_puppetdb_log,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0700',
          selrange => s0,
          selrole  => object_r,
          seltype  => var_log_t,
          seluser  => system_u,
        }
      }
    }