Puppet Class: osg::cvmfs::config

Defined in:
manifests/cvmfs/config.pp

Summary

Manage OSG CVMFS configs

Overview



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

class osg::cvmfs::config {

  file { '/etc/fuse.conf':
    ensure  => 'file',
    path    => '/etc/fuse.conf',
    content => "user_allow_other\n",
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  if versioncmp($::operatingsystemrelease, '7.0') < 0 {
    file { '/bin/fusermount':
      mode => '4755',
    }
  }

  autofs::mount { 'cvmfs':
    mount   => '/cvmfs',
    mapfile => '/etc/auto.cvmfs',
    order   => 50,
  }

  file { '/etc/cvmfs/default.local':
    ensure  => 'file',
    path    => '/etc/cvmfs/default.local',
    content => template('osg/cvmfs/default.local.erb'),
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
  }

  if empty($osg::cvmfs::cern_server_urls) {
    file { '/etc/cvmfs/domain.d/cern.ch.local':
      ensure => 'absent',
      path   => '/etc/cvmfs/domain.d/cern.ch.local',
    }
  } else {
    file { '/etc/cvmfs/domain.d/cern.ch.local':
      ensure  => 'file',
      path    => '/etc/cvmfs/domain.d/cern.ch.local',
      content => template('osg/cvmfs/cern.ch.local.erb'),
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
    }
  }

  if $osg::cvmfs::cms_local_site {
    file { '/etc/cvmfs/config.d/cms.cern.ch.local':
      ensure  => 'file',
      path    => '/etc/cvmfs/config.d/cms.cern.ch.local',
      content => template('osg/cvmfs/cms.cern.ch.local.erb'),
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      notify  => Exec['cvmfs_config reload'],
    }
  } else {
    file { '/etc/cvmfs/config.d/cms.cern.ch.local':
      ensure => 'absent',
      path   => '/etc/cvmfs/config.d/cms.cern.ch.local',
    }
  }

  file { '/var/lib/cvmfs':
    ensure => 'directory',
    owner  => $osg::cvmfs::user_name,
    group  => $osg::cvmfs::group_name,
    mode   => '0700',
  }

  if $osg::cvmfs::cache_base != '/var/lib/cvmfs' {
    file { $osg::cvmfs::cache_base:
      ensure => 'directory',
      owner  => $osg::cvmfs::user_name,
      group  => $osg::cvmfs::group_name,
      mode   => '0700',
    }
  }

}