From 5d150b7a717beeabd44ac1d34eca46adad215569 Mon Sep 17 00:00:00 2001 From: jigen Date: Fri, 20 Feb 2015 19:21:34 +0100 Subject: [PATCH] Nodeless setup --- manifests/site.pp | 86 +---------------------------------------------- 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 2682987..9e2dc61 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1,92 +1,8 @@ $admin=hiera('ortiche-admin') notify{"Variable is ${::admin}": } -$host=hiera('ortiche-host') -notify{"Variable is ${::host}": } hiera_include('ortiche-classes') -Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" , - "/usr/local/bin/", "/usr/local/sbin/" ] -} - -exec { "create_ortiche_directory": - command => "/bin/mkdir -p /etc/ortiche", - creates => "/etc/ortiche", - before => Exec['test_ortiche_host_dir'], -} - -exec {'test_ortiche_host_dir': - command => "false", - unless => "test -d /etc/ortiche/$::hostname", -} - -user { 'ortiche': - ensure => 'present', -} - -package { "screen": - ensure => "latest" -} - -class { 'apt': - use_volatile => true, -} - -class { 'apt::apticron': - email => 'gestione@posta.indivia.net', -} - -node 'snf-30710' { - postfix::config { - "relayhost": value => "[smtp.indivia.net]:25"; - } - class { 'postfix': - myorigin => 'dev_1.indivia.tk', - anon_sasl => 'yes', - } -} - -node 'snf-29152' { - file {"/etc/ssl/certs/tanacetum_mailserver_cert.pem": - ensure => 'present', - source => "/etc/ortiche/$::hostname/certs/ssl-cert-snakeoil.pem", - owner => 'root', - group => 'root', - mode => '0664', - require => Exec['test_ortiche_host_dir'], - } - - file {"/etc/ssl/private/tanacetum_mailserver_key.pem": - ensure => 'present', - source => "/etc/ortiche/$::hostname/private/ssl-cert-snakeoil.key", - owner => 'root', - group => 'root', - mode => '0600', - require => Exec['test_ortiche_host_dir'], - } - - host { 'tanacetum.ortiche.net': - ensure => 'present', - ip => '83.212.126.162', - host_aliases => ['tanacetum.indivia.tk', 'tanacetum'], - } - - postfix::config { - "relayhost": value => "[smtp.indivia.net]:25"; - "smtpd_tls_cert_file": value => "/etc/ssl/certs/tanacetum_mailserver_cert.pem"; - "smtpd_tls_key_file" : value => "/etc/ssl/private/tanacetum_mailserver_key.pem"; - } - -# class { 'postfix': -# myorigin => 'dev_2.indivia.tk', -# anon_sasl => 'yes', -# root_mail_recipient => "gestione@posta.indivia.net", -# require => [ File['/etc/ssl/certs/tanacetum_mailserver_cert.pem'], -# File['/etc/ssl/private/tanacetum_mailserver_key.pem'] ], -# } -} - - node default { - # intentionally nothing here + class {'ortiche-base': } }