# Puppet Class: puppet_cd::puppetdb::files

Inherits:
  puppet_cd::params

Defined in:
  manifests/puppetdb/files.pp

## Summary

Class manages puppetdb files

## Overview

puppet_cd::puppetdb::files.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
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    # File 'manifests/puppetdb/files.pp', line 6

    class puppet_cd::puppetdb::files (

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

        # bootstrap.cfg
        file { $pt_bootstrap_conf:
          ensure   => file,
          path     => $pt_bootstrap_conf,
          owner    => 'root',
          group    => 'root',
          mode     => '0644',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_bootstrap_erb),
          notify   => Service[$pt_puppetdb],
        }

        # requestlogging.xml
        file { $pt_request_logging_conf:
          ensure   => file,
          path     => $pt_request_logging_conf,
          owner    => 'root',
          group    => 'root',
          mode     => '0644',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_request_logging_erb),
          notify   => Service[$pt_puppetdb],
        }

        # logback.xml
        file { $pt_logback_conf:
          ensure   => file,
          path     => $pt_logback_conf,
          owner    => 'root',
          group    => 'root',
          mode     => '0644',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_logback_erb),
          notify   => Service[$pt_puppetdb],
        }

        # config.ini
        file { $pt_puppetdb_config_ini:
          ensure   => file,
          path     => $pt_puppetdb_config_ini,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0640',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_puppetdb_config_erb),
          notify   => Service[$pt_puppetdb],
        }

        # database.ini
        file { $pt_puppetdb_database_ini:
          ensure   => file,
          path     => $pt_puppetdb_database_ini,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0640',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_puppetdb_database_erb),
          notify   => Service[$pt_puppetdb],
        }

        # jetty.ini
        file { $pt_puppetdb_jetty_ini :
          ensure   => file,
          path     => $pt_puppetdb_jetty_ini ,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0640',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_puppetdb_jetty_erb),
          notify   => Service[$pt_puppetdb],
        }

        # repl.ini
        file { $pt_puppetdb_repl_ini:
          ensure   => file,
          path     => $pt_puppetdb_repl_ini,
          owner    => $pt_puppetdb_user,
          group    => $pt_puppetdb_user,
          mode     => '0640',
          selrange => s0,
          selrole  => object_r,
          seltype  => puppet_etc_t,
          seluser  => system_u,
          content  => template($pt_puppetdb_repl_erb),
          notify   => Service[$pt_puppetdb],
        }
      }
    }