From 5dbeda4578c2b82b9d45479b3333ff1462b9f9b7 Mon Sep 17 00:00:00 2001 From: Jude N Date: Sun, 28 Jul 2013 17:16:45 +0000 Subject: [PATCH 1/1] Initial commit of 'Hackers Gmail Replacement' manifests --- manifests/init.pp | 82 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 manifests/init.pp diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..64a0e71 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,82 @@ +# Puppet manifests for a 'hackers GMAIL replacement' based on +# http://dbpmail.net/essays/2013-06-29-hackers-replacement-for-gmail.html + +class hgr { + + package { + "postfix" : + ensure => installed; + "dovecot" : + ensure => installed; + "sasl2-bin": + ensure => installed; + + "spamassassin": + ensure => installed; + "pyzor": + ensure => installed; + + "incron" : + ensure => installed; + + "notmuch" : + ensure => installeD; + } + + service { + "postfix": + ensure => running, + enable => true, + require => Package["postfix"]; + "dovecot": + ensure => running, + enable => true, + require => Package["dovecot"]; + "saslauthd" + ensure => running, + enable => true, + require => Package["sasl2-bin"] + } + +# Beter support for pulling a github repo ? +# support for running 'sudo python setup.py install' to build afew + + package { + "python-dev": + ensure => installed; + "gcc" : + ensure => installed; + "git": + ensure => installed; + } + + file { + "/var/tmp/git": + ensure => directory; + } + + exec { + "clone-afew-repo": + cwd => "/var/tmp/git" + command => "git clone https://github.com/teythoon/afew /var/tmp/git/afew" + creates => "/var/tmp/git/afew/setup.py"; + requires => [File["/var/tmp/git"],Package["git"]] + "install-afew": + cwd => "/var/tmp/git/afew"; + command => "/usr/bin/python /var/tmp/git/afew/setup.py install", + creates => "/usr/local/bin/afew", + requires => [Exec["clone-afew-repo"],Package["python-dev"],Package["gcc"]]; + } + + file { + "/usr/local/bin/afew": + ensure => present, + require => Exec["install-afew"]; + "/usr/local/bin/my-notmuch-new.sh": + ensure => present, + mode => "0755", + source => "puppet:///module/hgr/my-notmuch-new.sh", + require => [Package["notmuch"], File["/usr/local/bin/afew"]]; + } + +} -- 2.39.5