aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMike (stew) O'Connor <stew@vireo.org>2011-02-17 21:37:27 -0500
committerMike (stew) O'Connor <stew@vireo.org>2011-02-17 21:37:27 -0500
commit3a1ab8b24140e56e96f7176b6fb1d82590fddbcc (patch)
tree938b07fece1a9150c84e3547a531b8e3bc8c4931 /manifests
downloadpuppet-monkeysphere-3a1ab8b24140e56e96f7176b6fb1d82590fddbcc.tar.gz
puppet-monkeysphere-3a1ab8b24140e56e96f7176b6fb1d82590fddbcc.tar.bz2
initial commit
Signed-off-by: Mike (stew) O'Connor <stew@vireo.org>
Diffstat (limited to 'manifests')
-rw-r--r--manifests/debian.pp16
-rw-r--r--manifests/init.pp22
-rw-r--r--manifests/signer.pp4
-rw-r--r--manifests/sshserver.pp29
-rw-r--r--manifests/sshserverdanger.pp11
5 files changed, 82 insertions, 0 deletions
diff --git a/manifests/debian.pp b/manifests/debian.pp
new file mode 100644
index 0000000..4166c79
--- /dev/null
+++ b/manifests/debian.pp
@@ -0,0 +1,16 @@
+class monkeysphere::debian {
+
+case $lsbdistcodename {
+ lenny: {
+ if $monkeysphere_ensure_version == ''
+ {
+ $monkeysphere_ensure_version = '1.4.10-2~bpo50+1'
+ }
+
+ if $gnupg_ensure_version == ''
+ {
+ $gnupg_ensure_version = '0.31-3~bpo50+1'
+ }
+ }
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..943d3eb
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,22 @@
+# monkeysphere module
+class monkeysphere {
+ module_dir { [ "monkeysphere", "monkeysphere/hosts", "monkeysphere/plugins" ]: }
+
+ case $operatingsystem {
+ debian: { include monkeysphere::debian }
+ }
+
+ if $monkeysphere_ensure_version == ''
+ {
+ $monkeysphere_ensure_version = 'installed'
+ }
+
+ if $gnupg_ensure_version == ''
+ {
+ $gnupg_ensure_version = 'installed'
+ }
+
+ package {"gnupg": ensure => $gnupg_ensure_version, }
+ package {"monkeysphere": ensure => $monkeysphere_ensure_version, require => [ Package["gnupg"] ] }
+
+}
diff --git a/manifests/signer.pp b/manifests/signer.pp
new file mode 100644
index 0000000..350b4be
--- /dev/null
+++ b/manifests/signer.pp
@@ -0,0 +1,4 @@
+class monkeysphere::signer inherits monkeysphere
+{
+ File <<| tag == 'monkeysphere-host' |>>
+}
diff --git a/manifests/sshserver.pp b/manifests/sshserver.pp
new file mode 100644
index 0000000..966e136
--- /dev/null
+++ b/manifests/sshserver.pp
@@ -0,0 +1,29 @@
+class monkeysphere::sshserver inherits monkeysphere
+{
+
+ exec {"import.hostkey":
+ command => "/usr/sbin/monkeysphere-host import-key /etc/ssh/ssh_host_rsa_key ssh://${fqdn} && echo Y | /usr/sbin/monkeysphere-host publish-key",
+ unless => "/usr/sbin/monkeysphere-host show-key",
+ user => root,
+ require => [ Package[ "monkeysphere" ] ],
+ }
+
+ if $monkeysphere_has_hostkey {
+ @@file { "/var/lib/puppet/modules/monkeysphere/hosts/${fqdn}":
+ ensure => present,
+ content => template("monkeysphere/host.erb" ),
+ require => [ Package[ "monkeysphere" ] ],
+ tag => 'monkeysphere-host',
+ }
+ }
+
+ file { "/etc/cron.d/update-monkeysphere-auth":
+ ensure => present,
+ source => "puppet:///modules/monkeysphere/etc/cron.d/update-monkeysphere-auth",
+ require => [ Package[ "monkeysphere" ] ],
+ mode => 0644,
+ owner => root,
+ group => root,
+ }
+
+}
diff --git a/manifests/sshserverdanger.pp b/manifests/sshserverdanger.pp
new file mode 100644
index 0000000..7d7f12c
--- /dev/null
+++ b/manifests/sshserverdanger.pp
@@ -0,0 +1,11 @@
+class monkeysphere::sshserverdanger inherits monkeysphere::sshserver
+{
+ augeas { "sshd_config":
+ context => "/files/etc/ssh/sshd_config",
+ changes => [
+ "set AuthorizedKeysFile /var/lib/monkeysphere/authorized_keys/%u"
+ ],
+ notify => Service[ "ssh" ],
+ }
+
+}