# Custom configuration for user profiles
class profile {
  file { "/etc/screenrc":
    source  => "puppet:///modules/nodo/etc/screenrc",
    owner   => "root",
    group   => "root",
    mode    => 0644,
    ensure  => present,
  }

  # 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,
  }
}