aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/profile.pp
blob: ab1008eee7987c5ac44ab757bbf9dc55457578ff (plain)
1
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
# Custom configuration for user profiles
class nodo::subsystem::profile {
  # As of squeeze, custom configuration can be placed directly at
  # /etc/profile.d, so in the future this file won't need to be
  # managed by puppet anymore.
  file { "/etc/profile":
    source  => [ "puppet:///modules/nodo/etc/profile.${::lsbdistcodename}",
                 "puppet:///modules/nodo/etc/profile",
               ],
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
    require => File['/usr/local/bin/prompt.sh'],
  }

  file { "/etc/bash.bashrc":
    source  => "puppet:///modules/nodo/etc/bash.bashrc",
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
    require => File['/usr/local/bin/prompt.sh'],
  }

  file { "/usr/local/bin/prompt.sh":
    source  => "puppet:///modules/nodo/bin/prompt.sh",
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
  }

  # This is already being sourced by bash.bashrc.
  file { "/etc/profile.d/prompt.sh":
    ensure => absent,
  }

  # See http://linuxforcynics.com/how-to/using-rxvt-unicode-with-screen
  #     https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630976
  #     https://bbs.archlinux.org/viewtopic.php?id=50647
  #     https://stackoverflow.com/questions/12345675/screen-cannot-find-terminfo-entry-for-xterm-256color
  file { '/lib/terminfo/r/rxvt-256color':
  source  => "puppet:///modules/nodo/terminfo/rxvt-256color",
    owner  => root,
    group  => root,
    mode   => 0644,
    ensure => $::lsbdistcodename ? {
      'squeeze' => present,
       default  => absent,
    },
  }
}