Initial Commit.
authorAndreas Schiermeier <andreas@schiermeier.name>
Mon, 7 Dec 2015 20:23:24 +0000 (21:23 +0100)
committerAndreas Schiermeier <andreas@schiermeier.name>
Mon, 7 Dec 2015 20:23:24 +0000 (21:23 +0100)
etckeeper-commit-post [new file with mode: 0755]
etckeeper-commit-pre [new file with mode: 0755]
manifests/site.pp [new file with mode: 0644]
modules/desktop/manifests/init.pp [new file with mode: 0644]
modules/persist/manifests/init.pp [new file with mode: 0644]
modules/system/manifests/init.pp [new file with mode: 0644]
puppet.conf [new file with mode: 0644]

diff --git a/etckeeper-commit-post b/etckeeper-commit-post
new file mode 100755 (executable)
index 0000000..489b2bd
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "committing changes in /etc after puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0
diff --git a/etckeeper-commit-pre b/etckeeper-commit-pre
new file mode 100755 (executable)
index 0000000..a66fb62
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+
+which etckeeper > /dev/null 2>&1 || exit 0
+
+etckeeper commit "saving uncommitted changes in /etc prior to puppet catalog run"
+
+# Failure of etckeeper should not be fatal.
+exit 0
diff --git a/manifests/site.pp b/manifests/site.pp
new file mode 100644 (file)
index 0000000..db4228a
--- /dev/null
@@ -0,0 +1,5 @@
+node default {
+       include system
+       include persist
+       include desktop
+}
diff --git a/modules/desktop/manifests/init.pp b/modules/desktop/manifests/init.pp
new file mode 100644 (file)
index 0000000..ca9d598
--- /dev/null
@@ -0,0 +1,13 @@
+class desktop {
+
+       $packages = [
+               'lxde',
+               'iceweasel',
+               'iceweasel-l10n-*',
+       ]
+  
+       package { $packages:
+               ensure => installed,
+       }
+
+}
diff --git a/modules/persist/manifests/init.pp b/modules/persist/manifests/init.pp
new file mode 100644 (file)
index 0000000..6f6045c
--- /dev/null
@@ -0,0 +1,18 @@
+class persist {
+
+       file { '/usr/local/sbin/git2puppet':
+               ensure => present,
+               content => "#!/bin/bash\ncd /etc/puppet && git pull && puppet apply /etc/puppet/manifests/site.pp\n",
+               mode => '0755',
+       }
+
+       $packages = [
+               'git-core',
+               'puppet',
+       ]
+  
+       package { $packages:
+               ensure => installed,
+       }       
+
+}
diff --git a/modules/system/manifests/init.pp b/modules/system/manifests/init.pp
new file mode 100644 (file)
index 0000000..fd2af64
--- /dev/null
@@ -0,0 +1,19 @@
+class system {
+
+       $packages = [
+               'chrony',
+               'sudo',
+               'lsof',
+               'vim',
+               'screen',
+               'rsync',
+               'tcpdump',
+               'pv',
+               'openssh-server',
+       ]
+  
+       package { $packages:
+               ensure => installed,
+       }       
+
+}
diff --git a/puppet.conf b/puppet.conf
new file mode 100644 (file)
index 0000000..266ec51
--- /dev/null
@@ -0,0 +1,14 @@
+[main]
+logdir=/var/log/puppet
+vardir=/var/lib/puppet
+ssldir=/var/lib/puppet/ssl
+rundir=/var/run/puppet
+factpath=$vardir/lib/facter
+prerun_command=/etc/puppet/etckeeper-commit-pre
+postrun_command=/etc/puppet/etckeeper-commit-post
+
+[master]
+# These are needed when the puppetmaster is run by passenger
+# and can safely be removed if webrick is used.
+ssl_client_header = SSL_CLIENT_S_DN 
+ssl_client_verify_header = SSL_CLIENT_VERIFY