Puppet Class: stns::server::config

Defined in:
manifests/server/config.pp

Overview

Parameters:

  • port (Integer) (defaults to: $stns::server::port)
  • user (Optional[String]) (defaults to: $stns::server::user)
  • password (Optional[String]) (defaults to: $stns::server::password)
  • tokens (Optional[Array]) (defaults to: $stns::server::tokens)


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
# File 'manifests/server/config.pp', line 6

class stns::server::config (
  Integer          $port     = $stns::server::port,
  Optional[String] $user     = $stns::server::user,
  Optional[String] $password = $stns::server::password,
  Optional[Array]  $tokens   = $stns::server::tokens,
){

  concat { '/etc/stns/server/stns.conf':
    ensure => present,
    owner  => 'root',
    group  => 'root',
    mode   => '0644',
    notify => Class['stns::server::service'],
  }

  concat::fragment {
    'header':
      target  => '/etc/stns/server/stns.conf',
      content => "# HEADER: Autogenerated by Puppet.\n\n",
      order   => '01';

    'server_config':
      target  => '/etc/stns/server/stns.conf',
      content => template('stns/server/stns.conf.erb'),
      order   => '20';

    'users_config':
      target  => '/etc/stns/server/stns.conf',
      content => "## Users configurations.\n",
      order   => '40';

    'groups_config':
      target  => '/etc/stns/server/stns.conf',
      content => "## Groups configurations.\n",
      order   => '60';
  }

}