Puppet Class: stns::server::config

Defined in:
manifests/server/config.pp

Overview

Parameters:

  • port (Any) (defaults to: $stns::server::port)
  • user (Any) (defaults to: $stns::server::user)
  • password (Any) (defaults to: $stns::server::password)


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

class stns::server::config (
  $port     = $stns::server::port,
  $user     = $stns::server::user,
  $password = $stns::server::password,
){

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

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

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

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

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

}