# Puppet Class: puppet_cd::main::user

Inherits:
  puppet_cd::params

Defined in:
  manifests/main/user.pp

## Summary

Class manages user settings for the puppet_cd module.

## Overview

puppet_cd::main::user.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

    # File 'manifests/main/user.pp', line 6

    class puppet_cd::main::user (

    ) inherits puppet_cd::params {
      if ($fqdn == $pt_pm_fqdn) and ($pt_manage_user == true) {
        user { $pt_user:
          ensure     => present,
          name       => $pt_user,
          allowdupe  => false,
          comment    => $pt_user_comment,
          gid        => $pt_user,
          managehome => true,
          home       => $pt_user_home,
          shell      => $pt_user_shell,
        }

        group { $pt_user:
          ensure    => present,
          name      => $pt_user,
          allowdupe => false,
        }
      }

      if ($fqdn == $pt_db_fqdn) and ($pt_manage_db_user == true) {
        user { $pt_db_user:
          ensure     => present,
          name       => $pt_db_user,
          allowdupe  => false,
          comment    => $pt_db_user_comment,
          gid        => $pt_db_user,
          managehome => true,
          home       => $pt_db_user_home,
          shell      => $pt_db_user_shell,
        }

        group { $pt_db_user:
          ensure    => present,
          name      => $pt_db_user,
          allowdupe => false,
        }
      }
    }