# https://wiki.koumbit.net/ObbyServer # http://gobby.0x539.de/trac/wiki/Infinote/Infinoted # http://www.webupd8.org/2011/04/how-to-set-up-and-use-gedit.html class infinoted( $password = hiera('infinoted::password', '') ) { include avahi case $password { '': { fail("You need to define infinoted password! Please set infinoted::password in your config") } } package { 'infinoted': ensure => installed, } group { "infinoted": ensure => present, allowdupe => false, } user { "infinoted": ensure => present, allowdupe => false, gid => 'infinoted', home => '/var/lib/infinoted', require => Group['infinoted'], shell => '/bin/false', } file { '/var/lib/infinoted': ensure => directory, owner => 'infinoted', group => 'infinoted', mode => 0750, require => User['infinoted'], } file { [ '/var/lib/infinoted/.config', '/var/lib/infinoted/.infinoted', '/var/lib/infinoted/.certs', '/var/lib/infinoted/data', '/var/lib/infinoted/export' ]: ensure => directory, owner => 'infinoted', group => 'infinoted', mode => 0750, require => File['/var/lib/infinoted'], } file { '/var/lib/infinoted/.config/infinoted.conf': ensure => present, owner => 'infinoted', group => 'infinoted', mode => 0640, content => template('infinoted/infinoted.conf.erb'), require => File['/var/lib/infinoted/.config'], } exec { 'infinoted-gen-keys': command => 'infinoted --create-key --create-certificate -k /var/lib/infinoted/.certs/cert.key -c /var/lib/infinoted/.certs/cert.cert &', creates => '/var/lib/infinoted/.certs/cert.key', require => '/var/lib/infinoted/.config/infinoted.conf', } supervisor::app { 'infinoted': source => [ 'puppet:///modules/site_infinoted/conf.d/infinoted.conf', 'puppet:///modules/infinoted/conf.d/infinoted.conf' ], require => [ File['/var/lib/infinoted/.config/infinoted.conf'], Exec['infinoted-gen-keys'] ], } }