aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-18 20:03:59 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-18 20:03:59 -0200
commita5907b01c4a619e5d6b7b5caf91068628d754c63 (patch)
tree5b05ce5c75fc6cb806c415c8c43402904e36e76a
parentaf85f475cc9d1c3e04f797f6b3d6487a26802646 (diff)
downloadpuppet-nodo-a5907b01c4a619e5d6b7b5caf91068628d754c63.tar.gz
puppet-nodo-a5907b01c4a619e5d6b7b5caf91068628d754c63.tar.bz2
Moving profile configuration to its own class
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/nodo.pp57
-rw-r--r--manifests/subsystems/profile.pp58
3 files changed, 60 insertions, 56 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 6790903..bbc1e50 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -63,6 +63,7 @@ import "subsystems/hosts.pp"
import "subsystems/locales.pp"
import "subsystems/tunnel.pp"
import "subsystems/monkeysphere.pp"
+import "subsystems/profile.pp"
# Import nodo classes
import "nodo.pp"
diff --git a/manifests/nodo.pp b/manifests/nodo.pp
index 5094352..b7efb96 100644
--- a/manifests/nodo.pp
+++ b/manifests/nodo.pp
@@ -10,6 +10,7 @@ class nodo {
include hosts
include locales
include tunnel
+ include profile
# Set timezone and ntp config
#
@@ -58,60 +59,4 @@ class nodo {
mode => 0755,
ensure => present,
}
-
- file { "/etc/screenrc":
- source => "puppet://$server/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://$server/modules/nodo/etc/profile.$lsbdistcodename",
- "puppet://$server/modules/nodo/etc/profile",
- ],
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- require => File['/etc/profile.d/prompt.sh'],
- }
-
- file { "/etc/bash.bashrc":
- source => "puppet://$server/modules/nodo/etc/bash.bashrc",
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- require => File['/etc/profile.d/prompt.sh'],
- }
-
- # As of squeeze, custom configuration can be placed directly at
- # /etc/profile.d, so in the future this file has to stay there.
- #
- # This change has been backported to lenny via puppet so this
- # file is not needed anymore.
- file { "/usr/local/bin/prompt.sh":
- ensure => absent,
- }
-
- file { "/etc/profile.d":
- ensure => directory,
- owner => "root",
- group => "root",
- }
-
- file { "/etc/profile.d/prompt.sh":
- ensure => present,
- source => "puppet://$server/modules/nodo/etc/profile.d/prompt.sh",
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- require => File['/etc/profile.d'],
- }
}
diff --git a/manifests/subsystems/profile.pp b/manifests/subsystems/profile.pp
new file mode 100644
index 0000000..9d7bafd
--- /dev/null
+++ b/manifests/subsystems/profile.pp
@@ -0,0 +1,58 @@
+# Custom configuration for user profiles
+class profile {
+ file { "/etc/screenrc":
+ source => "puppet://$server/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://$server/modules/nodo/etc/profile.$lsbdistcodename",
+ "puppet://$server/modules/nodo/etc/profile",
+ ],
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ require => File['/etc/profile.d/prompt.sh'],
+ }
+
+ file { "/etc/bash.bashrc":
+ source => "puppet://$server/modules/nodo/etc/bash.bashrc",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ require => File['/etc/profile.d/prompt.sh'],
+ }
+
+ # As of squeeze, custom configuration can be placed directly at
+ # /etc/profile.d, so in the future this file has to stay there.
+ #
+ # This change has been backported to lenny via puppet so this
+ # file is not needed anymore.
+ file { "/usr/local/bin/prompt.sh":
+ ensure => absent,
+ }
+
+ file { "/etc/profile.d":
+ ensure => directory,
+ owner => "root",
+ group => "root",
+ }
+
+ file { "/etc/profile.d/prompt.sh":
+ ensure => present,
+ source => "puppet://$server/modules/nodo/etc/profile.d/prompt.sh",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ require => File['/etc/profile.d'],
+ }
+}