Added inventorydb.
authorAndreas Schiermeier <as@ccc504j.site>
Tue, 17 Mar 2015 23:21:44 +0000 (00:21 +0100)
committerAndreas Schiermeier <as@ccc504j.site>
Tue, 17 Mar 2015 23:21:44 +0000 (00:21 +0100)
manifests/site.pp
modules/eventcalendar/manifests/params.pp
modules/inventorydb/manifests/init.pp [new file with mode: 0644]
modules/inventorydb/manifests/params.pp [new file with mode: 0644]

index c47c4be..322a84f 100644 (file)
@@ -6,3 +6,9 @@ node 'mtbf.ccc-ffm.de' {
   include infrateam
   include eventcalendar
 }
   include infrateam
   include eventcalendar
 }
+
+node 'wtf.ccc-ffm.de' {
+  include common
+  include infrateam
+  include inventorydb
+}
index e773065..2ef4147 100644 (file)
@@ -1,7 +1,6 @@
 class eventcalendar::params {
 
   $calmgmr = [ 'mandre',
 class eventcalendar::params {
 
   $calmgmr = [ 'mandre',
-               'aschiermeier',
              ]
 
 }
\ No newline at end of file
              ]
 
 }
\ No newline at end of file
diff --git a/modules/inventorydb/manifests/init.pp b/modules/inventorydb/manifests/init.pp
new file mode 100644 (file)
index 0000000..6a8a36e
--- /dev/null
@@ -0,0 +1,43 @@
+class inventorydb {
+
+  include params
+  
+  group { 'invdbadm':
+    ensure => present,
+    gid => 20000,
+    system => false,    
+  }
+
+  group { 'invdb':
+    ensure => present,
+    gid => 30000,
+    system => false,    
+  }
+
+  define assigngroups {
+    Common::Accountsetup::Account <| title == $name |> {
+      groups +> [ 'invdbadm', 'invdb' ],
+    }
+  }
+
+  file { '/srv/invdb':
+    ensure => directory,
+    mode => '0775',
+    owner => 'root',
+    group => 'invdb',
+    require => Group['invdb'],
+  }
+
+
+  file { '/etc/sudoers.d/group-invdb':
+    ensure => present,
+    mode => '0440',
+    owner => 'root',
+    group => 'root',
+    content => "%invdbadm ALL=(ALL) NOPASSWD: ALL\n",
+    require => [ Group['invdbadm'], Package['sudo'], ],
+  }
+
+  assigngroups{$inventorydb::params::invdbmgmr:}
+
+}
\ No newline at end of file
diff --git a/modules/inventorydb/manifests/params.pp b/modules/inventorydb/manifests/params.pp
new file mode 100644 (file)
index 0000000..9d8626e
--- /dev/null
@@ -0,0 +1,6 @@
+class inventorydb::params {
+
+  $invdbmgmr = [ 'kwolff',
+             ]
+
+}
\ No newline at end of file