aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-04-10 10:35:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-04-10 10:35:55 -0300
commit279833df056e8bbba7af670b8a2d0aaadcc73f5f (patch)
tree41fa8cf1e692ed5274ec12ff86113b9eca766368
parent49b83148ea8fad09fe62f7d91e936b60f42d4990 (diff)
downloadpuppet-nodo-279833df056e8bbba7af670b8a2d0aaadcc73f5f.tar.gz
puppet-nodo-279833df056e8bbba7af670b8a2d0aaadcc73f5f.tar.bz2
Adding laptop class, pam and xorg subsystems
-rw-r--r--files/etc/crypttab/laptop5
-rw-r--r--files/etc/fstab/laptop5
-rw-r--r--manifests/desktop.pp42
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/laptop.pp29
-rw-r--r--manifests/subsystems/pam.pp28
-rw-r--r--manifests/subsystems/xorg.pp10
7 files changed, 84 insertions, 38 deletions
diff --git a/files/etc/crypttab/laptop b/files/etc/crypttab/laptop
new file mode 100644
index 0000000..ec3b60d
--- /dev/null
+++ b/files/etc/crypttab/laptop
@@ -0,0 +1,5 @@
+# <target name> <source device> <key file> <options>
+root /dev/mapper/vg-root none luks,cipher=aes-cbc-essiv:sha256
+home /dev/mapper/vg-home none luks,cipher=aes-cbc-essiv:sha256
+var /dev/mapper/vg-var none luks,cipher=aes-cbc-essiv:sha256
+cswap /dev/sda1 /dev/random swap,cipher=aes-cbc-essiv:sha256
diff --git a/files/etc/fstab/laptop b/files/etc/fstab/laptop
new file mode 100644
index 0000000..0acbbac
--- /dev/null
+++ b/files/etc/fstab/laptop
@@ -0,0 +1,5 @@
+/dev/mapper/cswap none swap sw 0 0
+/dev/mapper/root / ext3 defaults,errors=remount-ro 0 1
+/dev/mapper/home /home ext3 defaults,errors=remount-ro 0 2
+/dev/mapper/var /var ext3 defaults,errors=remount-ro 0 2
+/dev/sda2 /boot ext3 defaults,errors=remount-ro 0 2
diff --git a/manifests/desktop.pp b/manifests/desktop.pp
index 686801b..39ce4f0 100644
--- a/manifests/desktop.pp
+++ b/manifests/desktop.pp
@@ -1,9 +1,11 @@
class nodo::desktop inherits nodo::physical {
include utils::desktop
+ include pam
+ include xorg
# fstab
file { "/etc/fstab":
- source => "puppet://$desktop/modules/nodo/etc/fstab/desktop",
+ source => "puppet://$server/modules/nodo/etc/fstab/desktop",
owner => "root",
group => "root",
mode => 0644,
@@ -12,7 +14,7 @@ class nodo::desktop inherits nodo::physical {
# crypttab
file { "/etc/crypttab":
- source => "puppet://$desktop/modules/nodo/etc/crypttab/desktop",
+ source => "puppet://$server/modules/nodo/etc/crypttab/desktop",
owner => "root",
group => "root",
mode => 0644,
@@ -24,40 +26,4 @@ class nodo::desktop inherits nodo::physical {
ensure => directory,
mode => 0755,
}
-
- # pam - login
- file { "/etc/pam.d/login":
- source => "puppet://$desktop/modules/nodo/etc/pam.d/login",
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- }
-
- # pam - gdm
- file { "/etc/pam.d/gdm":
- source => "puppet://$desktop/modules/nodo/etc/pam.d/gdm",
- owner => "root",
- group => "root",
- mode => 0644,
- ensure => present,
- }
-
- # pam - mountpoints
- file { "/etc/security/pam_mount.conf.xml":
- ensure => present,
- owner => root,
- group => root,
- mode => 0644,
- source => "puppet://$server/files/etc/security/pam_mount.conf.xml",
- }
-
- # xorg
- file { "/etc/X11/xorg.conf":
- ensure => present,
- owner => root,
- group => root,
- mode => 0644,
- source => "puppet://$server/files/etc/X11/xorg.conf/$hostname",
- }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 019b6e3..518d86a 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -15,6 +15,8 @@ import "subsystems/utils.pp"
import "subsystems/database.pp"
import "subsystems/websites.pp"
import "subsystems/munin.pp"
+import "subsystems/pam.pp"
+import "subsystems/xorg.pp"
# Import nodo classes
import "nodo.pp"
@@ -28,3 +30,4 @@ import "proxy.pp"
import "storage.pp"
import "test.pp"
import "removable.pp"
+import "laptop.pp"
diff --git a/manifests/laptop.pp b/manifests/laptop.pp
new file mode 100644
index 0000000..d51a643
--- /dev/null
+++ b/manifests/laptop.pp
@@ -0,0 +1,29 @@
+class nodo::laptop inherits nodo::physical {
+ include utils::laptop
+ include pam
+ include xorg
+
+ # fstab
+ file { "/etc/fstab":
+ source => "puppet://$server/modules/nodo/etc/fstab/laptop",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ }
+
+ # crypttab
+ file { "/etc/crypttab":
+ source => "puppet://$server/modules/nodo/etc/crypttab/laptop",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ }
+
+ # data
+ file { "/var/data":
+ ensure => directory,
+ mode => 0755,
+ }
+}
diff --git a/manifests/subsystems/pam.pp b/manifests/subsystems/pam.pp
new file mode 100644
index 0000000..3358784
--- /dev/null
+++ b/manifests/subsystems/pam.pp
@@ -0,0 +1,28 @@
+class pam {
+ # pam - login
+ file { "/etc/pam.d/login":
+ source => "puppet://$server/modules/nodo/etc/pam.d/login",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ }
+
+ # pam - gdm
+ file { "/etc/pam.d/gdm":
+ source => "puppet://$server/modules/nodo/etc/pam.d/gdm",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ }
+
+ # pam - mountpoints
+ file { "/etc/security/pam_mount.conf.xml":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => "puppet://$server/files/etc/security/pam_mount.conf.xml",
+ }
+}
diff --git a/manifests/subsystems/xorg.pp b/manifests/subsystems/xorg.pp
new file mode 100644
index 0000000..60902d1
--- /dev/null
+++ b/manifests/subsystems/xorg.pp
@@ -0,0 +1,10 @@
+class xorg {
+ # xorg
+ file { "/etc/X11/xorg.conf":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => "puppet://$server/files/etc/X11/xorg.conf/$hostname",
+ }
+}