Puppet Class: beegfs::client::config

Defined in:
manifests/client/config.pp

Overview



2
3
4
5
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
# File 'manifests/client/config.pp', line 2

class beegfs::client::config {

  $conn_interfaces  = $beegfs::client_conn_interfaces
  $conn_net_filters = $beegfs::client_conn_net_filters

  if ! defined(File['/etc/beegfs']) {
    file { '/etc/beegfs':
      ensure => 'directory',
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
    }
  }

  file { '/etc/beegfs/beegfs-client.conf':
    ensure  => 'present',
    content => template("beegfs/${beegfs::release}/beegfs-client.conf.erb"),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  #augeas { 'beegfs-client.conf':
  #  context => '/files/etc/beegfs/beegfs-client.conf',
  #  changes => template('beegfs/client-augeas.erb'),
  #  lens    => 'BeeGFS_config.lns',
  #  incl    => '/etc/beegfs/beegfs-client.conf',
  #}

  file { $beegfs::client_conn_interfaces_file:
    ensure  => $beegfs::client_conn_interfaces_file_ensure,
    content => template('beegfs/interfaces.erb'),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  file { $beegfs::client_conn_net_filter_file:
    ensure  => $beegfs::client_conn_net_filter_file_ensure,
    content => template('beegfs/netfilter.erb'),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  if ! defined(File[$beegfs::conn_tcp_only_filter_file]) {
    file { $beegfs::conn_tcp_only_filter_file:
      ensure  => $beegfs::_conn_tcp_only_filter_file_ensure,
      content => inline_template('<%= scope.lookupvar("beegfs::conn_tcp_only_filters").join("\n") %>'),
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
    }
  }

  if ! $beegfs::utils_only {
    file { '/etc/beegfs/beegfs-helperd.conf':
      ensure  => 'present',
      content => template("beegfs/${beegfs::release}/beegfs-helperd.conf.erb"),
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
    }

    if $beegfs::manage_client_mount_path {
      exec { "mkdir -p ${beegfs::client_mount_path}":
        path    => '/usr/bin:/bin:/usr/sbin:/sbin',
        creates => $beegfs::client_mount_path,
      }
    }

    file { '/etc/beegfs/beegfs-mounts.conf':
      ensure  => 'present',
      content => template("beegfs/${beegfs::release}/beegfs-mounts.conf.erb"),
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
    }

    file { '/etc/beegfs/beegfs-client-autobuild.conf':
      ensure => 'present',
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
    }

    file_line { 'beegfs-client-autobuild buildArgs':
      ensure  => 'present',
      path    => '/etc/beegfs/beegfs-client-autobuild.conf',
      line    => "buildArgs=${beegfs::client_build_args}",
      match   => '^buildArgs=.*$',
      require => File['/etc/beegfs/beegfs-client-autobuild.conf'],
    }

    file_line { 'beegfs-client-autobuild buildEnabled':
      ensure  => 'present',
      path    => '/etc/beegfs/beegfs-client-autobuild.conf',
      line    => "buildEnabled=${beegfs::client_build_enabled}",
      match   => '^buildEnabled=.*$',
      require => File['/etc/beegfs/beegfs-client-autobuild.conf'],
    }
  }

}